Skip to content

Fix usage chart specks, picture viewer over the title bar, worktree gap and queued tool timing - #534

Open
tpm28 wants to merge 5 commits into
devfrom
fix/chart-stroke-joints
Open

tpm28 wants to merge 5 commits into
devfrom
fix/chart-stroke-joints

Conversation

@tpm28

@tpm28 tpm28 commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #533

Summary

  • Usage chart (Usage chart: dark specks at the joints of the recorded line; subchat tree bend irregular #533). In Settings → Usage, the red "Recorded" line of a subscription window had a dark speck at every joint. It is now one solid line.
  • Picture viewer. Clicking a picture in a chat or in the composer opened a viewer that covered the whole window, title bar included. While it was open, the window could not be moved, minimised, maximised or closed. On Windows, clicking where the maximise button is actually hit the viewer's download button and opened "Save picture".
    • With 1loop's own title bar, the viewer now opens under that bar. Minimise, maximise, close and dragging the window work while a picture is shown.
    • Escape still closes the viewer, even after a click on the title bar.
    • With the system title bar, or in the web app, nothing changes.
  • Sidebar worktrees. When two worktrees of a project had the same name (for example two base (detached)), the unfolded list showed an empty gap and one of them was missing. Both now show, with no gap.
  • Claude Code tool rows. When the model sends a command and a file read together, Claude Code runs the read only after the command ends. 1loop timed the read from the moment it was sent, so a read that failed at once showed the command's duration (1m 59s). Each row now shows its own time.
  • Activity label. The line under the chat said "Waiting for the model" as soon as one tool finished, even while another was still running. It now keeps the running tool's label until every tool has its result.

Screenshots

Linux shots: Xvfb at scale 1.4. Windows shots: a Windows 10 VM, with cross-built exes of dev (c31a471) and of this branch. "Before" is dev, "After" is this branch. Every pair shows the same screen with the same saved state.

Before After
Usage chart, weekly window (Linux) Before After
Two worktrees named base (detached), unfolded (Linux) Before After
Picture viewer open (Linux) Before After
Picture viewer open (Windows) Before After
Click on the maximise button with the viewer open (Windows) Before After

In the last "Before", the click lands on the viewer's download button and opens "Save picture". In the "After", the window is maximised, and the viewer follows the new size under the title bar.

The tool-row timing and the activity label were not captured: that needs a live Claude Code session, which these test machines do not have. They are covered by the unit test below.

Technical details

  • internal/ui/chart_strokes.go, disc:
    • The joint discs now wind in the same direction as the stroke quads. golang.org/x/image/vector.Rasterizer adds signed areas, so the opposite winding cancelled out where a disc overlapped its quad.
    • TestStrokeJointsAreSolid (usage_limits_test.go) checks the alpha at every joint at scales 1, 1.4 and 2. It fails 3 times on the old code.
  • internal/ui/picture_viewer.go and internal/ui/desktop.go:
    • With custom chrome, build() adds a pictureLayer between ui.root and the resize edges. Its layout, underTitleBar, places the viewer below ui.titleBar.
    • openImage adds the viewer to this layer instead of canvas.Overlays(). A Fyne overlay is the only tree hit-tested while it is shown, so the title bar under it could never receive a click.
    • Without chrome, the layer is nil and the old overlay path is kept.
    • closePicture() is called from the canvas' OnTypedKey for Escape: a click on the title bar takes the focus from the viewer.
  • internal/ui/worktrees.go and internal/ui/sidebar_groups.go:
    • worktreeRows now also returns one key per row: path:<folder> for a worktree, fold and new for the other two rows.
    • Before, the key was the row's label, so two rows with one label had one key. glideLayout then put both on the same target and left a hole. TestWorktreeRowsKeyedByFolder covers it.
  • internal/agent/claudecode.go:
    • Pending calls are kept in order in a queue.
    • claudeRunning models Claude Code's batching: consecutive concurrency-safe tools (Read, Grep, Glob, LS, WebFetch, WebSearch, ToolSearch, Task/Agent, TaskOutput) run together, and any other tool runs alone.
    • tool_exec, and with it the start time, is emitted only when a call enters the running batch. Each tool_result starts the next batch.
    • On approval, only running calls restart their clock. TestClaudeRunningQueue covers the batching.
  • internal/ui/transcript.go: on tool_result, the "wait" activity is shown only when no other tool row is still running.
  • The uneven arc in the subchat tree, also raised in Usage chart: dark specks at the joints of the recorded line; subchat tree bend irregular #533, is fixed separately by Smooth shadows and halo, crisp subchat tree lines #478.
  • Checks:
    • gofmt, go vet ./... and go test ./... pass, as does wasm go vet of internal/ui and cmd/1loop-web.
    • Hand tests on the Linux desktop: chart, worktrees, viewer, Escape, and the window ✕.
    • Hand tests on Windows desktop: viewer, maximise, minimise, Escape, and the ✕, which shows the "1loop stays in the tray" notice.
    • Android is not touched.

Assisted-by: Claude Opus 5.5 medium

🤖 Generated with Claude Code

tpm28 and others added 5 commits November 17, 2026 15:55
The joints' discs turned the other way from the strokes' quads: the
rasterizer adds signed areas, so each disc cut a hole where it met its
stroke.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Assisted-by: Claude Opus 5.5 medium
Claude Code runs a Read sent with a command once the command is over.
1loop started both clocks at once: a Read that failed at once showed
1m59s. Calls are now started in Claude Code's order, and a result keeps
the label of a call still running instead of 'Waiting for the model'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Assisted-by: Claude Opus 5.5 medium
It covered the whole window, title bar included: the window could no
longer be moved, minimised, maximised or closed while it was open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Assisted-by: Claude Opus 5.5 medium
Rows were keyed by their label; two worktrees named 'base (detached)'
shared a key and were laid on one place, leaving a hole above.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Assisted-by: Claude Opus 5.5 medium
The click takes the keyboard focus from the viewer; the window's own
key handler now closes the picture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Assisted-by: Claude Opus 5.5 medium
@tpm28 tpm28 changed the title Fix usage chart specks, picture viewer over the title bar, worktree gap, queued tool timing Fix usage chart specks, picture viewer over the title bar, worktree gap and queued tool timing Nov 17, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant