Repository navigation
fix(desktop,agent): files panel button off a right-docked terminal; canonical run fold cache - #1602
Merged
Merged
Conversation
…ked terminal Reported on the docked-right screenshot: the collapsed files panel's button (top right of the conversation) was drawn over the terminal's own header, next to its close control. That button — and the panel's drawer — are absolutely positioned, and their containing block was the shell root, i.e. the window. That was the same thing as "the conversation's right edge" only while nothing else sat to the right of the content column. The right-docked terminal is now a sibling of that column instead of a child of it, and the column itself is `relative`. The two affordances therefore resolve against the column (conversation + files panel) and stop at the terminal's left edge; the drawer stops there too, so it no longer covers the terminal either. Measured at 1440×900: the column is 1020..1440 and the button 972..1004, so it sits inside the conversation as intended (it used to be at ~1232..1264, on the terminal's header). The `terminal-right` scenario now asserts that gap, so a return of the overlap fails the capture instead of needing a pair of eyes.
…/terminal-panel-affordance)
`run_epoch` asked only `run_events`, but a converted conversation keeps its journal in the canonical stream tables and writes no `run_events` row at all. It therefore answered `None` for every run created since the conversion, and `uncaptured_run_snapshot` — whose cache block is gated on `if let Some(epoch)` — never consulted the fold cache added in #1486. Every open of a run no longer in the agent's memory paid the whole fold again: the cost that cache was measured to remove (4.1 s -> 0.2 s on a 136k-event run). The epoch now comes from whichever store holds the run: the canonical stream tables first (newest epoch; a retired stream is not a source), then the legacy table, which is the shape `run_replay_watermark` already used for the same question. The cache identity is unchanged — version, epoch and the stored fold's own validation still decide a hit, so a restart or fork that bumps the epoch is still a miss. Test: a canonical run reports its epoch and hits its cached fold, and a newer epoch on the same run invalidates it. Falsified against the previous `run_epoch`, which returned `None` on the same fixture.
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.
Summary
Two fixes that landed on
dev-huichenafter #1601: the desktop's collapsed files panel no longer draws its button and drawer over a right-docked terminal, and an agent run whose journal lives in the canonical stream tables now reports its epoch, so its fold cache is actually consulted.Commits
fix(desktop): the files panel's button no longer lands on a right-docked terminalfix(agent): keep the fold cache reachable for canonical runsVerification
Self-test on a detached worktree at
957fc7ab5, Rust pinned to 1.99.1 perrust-toolchain.toml,ulimit -n 8192:cargo fmt --all -- --check-> cleancargo clippy -p future-agent --all-targets -- -D warnings-> cleancargo test -p future-agent --lib session::journal_compaction-> 34 passednpx tsc --noEmit-> clean;eslinton the three changed sources -> clean;npx vitest run src/components/layout/AppShell.test.tsx src/features/terminal-> 19 files / 373 tests passedmake check-docs-> 417 docs OK, 0 pairs pending bilingualization, provider matrix 13 rows OKUser-visible changes
f8d195bb6.78abb3abf.Notes
The
terminal-rightscreenshot scenario now asserts the gap between the collapsed files button and a right-docked terminal, so a regression fails the capture rather than needing a pair of eyes.