Repository navigation
fix(sidebar): keep plugin token follow-ups from #1341 in step with the rows - #1402
Conversation
…e rows The phone sheet scrolls long token values instead of pushing its actions out, an open sheet reads its row at each render, a recovery resets the display_agent baseline to the resynced snapshot, and a token named twice in herdr's rows shows at the first place that does not hide it. Refs #1349.
|
@coderabbitai review |
|
CodeRabbit did not review ba0ea26 (its review allowance ran out; |
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 10
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
Tip For best results, initiate chat on the files or code changes. @devswha Thanks for clarifying. You are interacting with an AI system. |
Refs #1349 (items 1, 2, 3 and 5; item 4, hide-rule operands on the machine events, touches what watch-only browsers receive and goes in its own PR).
Change
Follow-ups to #1341 (plugin pane tokens in the sidebar, not released yet, so no changelog fragment:
changelog.d/sidebar-plugin-tokens.mdstill describes the feature)..row-sheet-detailis capped at a third of the screen and scrolls. Before, 32 long tokens filled the sheet: the title scrolled off the top and Pin agent sat under Cancel, out of reach. This follows the iOS action sheet (and the Claude and Codex apps' long-press sheets): a long message scrolls, the actions stay put.AgentSidebarkept a copy of the title, place and tokens taken when the menu opened. The menu now keeps only which row and anchor, and reads what it says from the row at each render, so a changed value, a hide rule that now applies or a PC going away shows in the open sheet too.display_agent) after a recovery is measured against what clients show. The collector's dedupe baseline was seeded only for panes it had never seen, so after a lost subscription the baseline stayed at the line heard before the loss. A change back to that line then looked like no change, and the sidebar waited for the next roster poll. On a resync, which already tells clients to read the panes again, the baseline now takes the snapshot's line, except for panes an event has spoken for since the snapshot was asked.server/herdr-sidebar.tskept only the first place of a token, so a token hidden by its first place's rule showed nowhere, though herdr tests each place on its own (src/ui/sidebar/tokens.rsmaps every row entry independently). The parser now keeps each place, andpaneTokenValuessays a token once, at the first place whose rules leave it shown. Theherdr-sidebarmachine event may now list a name more than once; an older browser reading it keeps the first place, as before.Validation
bun run check fast: workflow syntax, generated types and themes, typecheck, build, unit tests (4504 pass, 0 fail, 8 skip).shared/pane-tokens.test.ts(a token named twice),server/herdr-sidebar.test.ts(each place kept, updated from "each once"),server/collector.test.ts(an event after a recovery). The collector case times out against main'sserver/collector.tsand passes with this change.scripts/sidebar-tokens-demo-regression.ts(demo fixture, no live session) gained two phone checks: the open sheet's detail follows a changed value, and with 32 long tokens the sheet's title, Pin agent and Cancel are on screen and hit-testable while the detail scrolls. All four desktop and phone passes are green. Both checks failed on main when reproduced by hand before the fix (Pin agent covered by Cancel; sheet kept40% 12m · 5h 95%after the row changed).