Repository navigation
Studio: recover saved context when switching back to a snapshot path - #10447
Conversation
|
Confirmed this hits chat-page.tsx where rememberedConfigFor still calls resolveInitialConfig, so a repo-keyed context pin is dropped when the id is a snapshot path, unlike apply-inference-status-to-store.ts which already uses the resident alias. Will get this reviewed. |
The new call sits at 89 columns, past biome's default 80, so running the repo's own `npm run biome:fix` rewraps it across four lines. Both new tests assert on the source text of `rememberedConfigFor` and match the single-line form, so the formatter breaks them. Wrap the call here and match either form in the tests, the way llama-extra-args-panel-hydration.test.ts already does. With this the tests pass whether or not the file has been formatted, and still fail against the old `resolveInitialConfig` call.
|
Reviewed and verified end to end. The change is correct, and I pushed one small commit to the branch (details at the bottom). The fix works, measured rather than readTwo Studio installs, the PR's own merge base ( Same model, same chat, same quant on both sides. Only the context differs:
Why the swap is safe
I ran a matrix over the real module to hold that rather than assert it. 45 cases, all green: 12 snapshot path forms (Linux, macOS, macOS with spaces, Windows drive letter, lowercase drive, UNC, mixed separators, WSL, relative, Old installs are fine: the diff touches only Also ran it under Chromium, Firefox and WebKit against a real And the test is load-bearing: reverting only the One thing worth knowing about the reachable flowThe bar is suppressed unless the chat's stored model id is still selectable ( So the local-to-local repro in #10338 does not reach this lookup at all. The flows that do are a variant change on the same resident snapshot (what the screenshots use) and a switch to an external provider, which leaves the local model resident. That does not make the PR wrong, it is a genuine fix on a genuine path, but if @jimster480's repro was local-to-local then the remaining half belongs in Two smaller notes
Separately, and unrelated to this change: the notice renders as "This chat was started on 9217f5db79a29953eb74d5343926648285ec7e67" because What I pushedOne commit, |
# Conflicts: # studio/frontend/src/features/chat/chat-page.tsx
|
@codex security review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Re-ran the before/after capture after the merge with main, since both ends of the comparison moved (base is now Same result, so the merge changed nothing about the behaviour:
Same model, same quant, same chat on both sides ( Cross-platform and browserRan the branch through per-OS CI and a live Studio Playwright pass on a staging repo rather than the org queue. On the merged branch: ubuntu-latest green, macos-15 green, and the studio-live Playwright job green (Studio boots, the chat page renders, the seeded token reaches localStorage, streamed text and an image arrive, video is captured). windows-latest was cancelled mid-flight by Separately I ran the resolver itself under Chromium, Firefox and WebKit against a real Merge conflictThe PR had gone |
|
Following up on the windows run, and correcting something I said about the Playwright job. windows-latest is green, so the OS triple is complete on the merged branch: ubuntu-latest, macos-15 and windows-latest all pass. The correction: I described the studio-live Playwright job as showing that "the chat page renders". That is not what it does. The smoke stands up its own stub HTML page on a local port and drives Playwright against that, while Studio itself runs separately and is only checked for a The before/after composite in my previous comment remains the only artifact here that compares base against head, and it stands: |
|
Taking the compare-pane lookup as a separate PR. |


Switch Back looks up remembered load settings through
resolveInitialConfig(#10338). That misses a repo-keyed record when the thread id is a Hugging Face snapshot path, so the switch loads without the saved context pin.rememberedConfigFornow usesresolveResidentInitialConfig, the same aliasapply-inference-status-to-store.tsalready uses for a resident snapshot path.cd studio/frontend && node --experimental-strip-types --test tests/chat-remembers-its-model.test.ts-> 26 passed. Revertingchat-page.tsxto upstream/main -> 2 failed (tests 23 and 24, the switch-back cases).