Repository navigation
chat: a group stays open or shut where it was put, its rows whole - #5
Merged
Merged
Conversation
The chats tree handed each group row an `expanded` worked out afresh every frame (open when it holds the active chat, is the open folder, or is the only folder). The tree widget reads `expanded` as where the row should be and animates toward it whenever it differs from where the row is, so a folder opened by a click while that wish said shut restarted its fold every frame: it stuck about a frame into it (val ~0.80), its last chat row cut off, the app redrawing at full rate (~46% CPU idle in a Debug sandbox). A section closed by a click popped back open. Now the wish only opens a group the first time it is drawn, or when a chat in it becomes active; after that the tree is handed back what it last was. A section row also gets an id of its own: it shared one with its "No folder" row (both `client` + `""`), which lit both rows' + together. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fixes the last chat row of a section showing cut off at its bottom edge (seen on macOS 2026-10-16: "okay" under Agents › No folder, with the Sample header right after it). It's the same bug behind the tree flickering, changing size, and sections that won't stay closed.
Why the section came up short
Explorer.drawworked out each group row'sexpandedafresh every frame: open when it holds the active chat, is fizzy's open folder, or is the client's only folder.core.widgets.TreeWidgetreadsexpandedas where the row should be. Whenever that differs from where the row is, it animates toward it (Branch.expander:init_options.expanded != self.expanded).So a folder the person opened while that wish said "shut" called
startEnd()on every frame. Each call restarted the fold, so the animation never ended. It stuck about one frame into the fold (val ≈ 0.80 in the log), with the bottom of the group clipped off and the app redrawing at full rate. A section closed by a click had the opposite problem: it popped back open the next frame, because its wish was alwaystrue.None of the suspects listed in the report was the cause. The measured height was right, and the clip rect came from the animation's current size. That animation was stuck because it was restarted every frame.
The change
open: each group's open state, by row id. The wish (first_open) only applies the first time a group is drawn. After that the tree gets back what the row last was (recorded right afterexpander). It is the same rule the workbench file tree follows withexplorerBranchIsOpen.groupId: a section row's id is now separate from its "No folder" row's id. Both wereidOf(client, "", "group"), so they would have shared one open state, and hovering one row's + already lit up the other's.How it was seen
macOS 26, Debug. A sandbox profile (
fizzy --profile <scratch>/profile) with fizzy atmain(a30dcf1), and this plugin built withFIZZY_PROFILE=… zig build --fork=<that checkout>/sdk. Seeded data: Agents (pixelart: 2 chats; No folder: 3, "okay" last) and Sample (2). Driven by demo tapes (rail anchorfizzy.rail:chat.chats, then clicks on the rows), with window captures of the sidebar:Not checked on Linux or Windows; nothing here is platform-specific.
🤖 Generated with Claude Code