fix: make Workspace context state and defaults explicit#608
Draft
luokerenx4 wants to merge 3 commits into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
0023_workspace_default_context_windowRoot cause
Credential injection and the Workspace settings UI independently defaulted Pi/OpenCode custom models to 1M. Explicit credential selection re-rendered runtime config from that default and discarded the Workspace's model-specific context choice. The existing user-global credential defaults also had no context field; adding one initially exposed a second edge case where a declaration without an explicit model wrote only the provider connection, so the context limit never reached the generated runtime config.
Separately, WebPi scrolled to the transcript tail for every snapshot revision, so polling and streaming updates could prevent completed conversations from being read upward.
User impact
Users can explicitly choose what provider state a new Workspace starts with. Pi and OpenCode show 256K as the safe default, warn above it, and write the selected value into each new Workspace's local config. Existing Workspaces are untouched and remain independently editable. Repeated Quick Chat launches keep the existing Workspace's explicit context choice.
Validation
npx tsc --noEmitcd ui && npx tsc -bpnpm -F @traderalice/desktop typecheckpnpm test— 2,991 passed, 6 skippedCSC_IDENTITY_AUTO_DISCOVERY=false pnpm electron:smoke:workspaceScope note
This branch is based on current
devand intentionally does not mix in the unrelated Windows path-assertion cleanup identified on PR #607.Fixes #601