Skip to content

Stabilize toolbar status layout - #584

Closed
onevtail wants to merge 2 commits into
mainfrom
relay/fix-54-optimize-toolbar-layout-jitter-and-statu
Closed

Stabilize toolbar status layout#584
onevtail wants to merge 2 commits into
mainfrom
relay/fix-54-optimize-toolbar-layout-jitter-and-statu

Conversation

@onevtail

Copy link
Copy Markdown
Collaborator

What

  • Reserve a bounded, compressible layout slot for the principal toolbar status area.
  • Tail-truncate long status and PR/check summaries while preserving toast help and accessibility text.
  • Add regression coverage for stable status width and single-line behavior under constrained width.

Why

The principal status view previously used its intrinsic content width, causing toolbar remeasurement and visible layout shifts when switching between idle hints, PR summaries, and toasts.

Fixes #471

How tested

  • make check
  • make build-app
  • Focused ToolbarStatusViewTests (2 passing tests)
  • make test (1,788 passing; one unrelated local ExternalDiffToolTests failure is blocked by a host Git identity hook)

— PR prepared by onevclaw on behalf of @onevcat

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request stabilizes the .principal toolbar status area by giving ToolbarStatusView a bounded, compressible layout slot and enforcing single-line tail truncation, eliminating layout shifts when the status content changes (idle hint ↔ PR summary ↔ toast).

Changes:

  • Make ToolbarStatusView own a fixed ideal/max width (280pt) with single-line tail truncation, and preserve full toast text via hover help + accessibility labels.
  • Remove duplicated outer horizontal padding from WorktreeDetailView call sites now that ToolbarStatusView applies it consistently.
  • Add regression tests to lock in stable ideal width and single-line behavior under constrained width, plus update the user manual/docs sync metadata.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
supacodeTests/ToolbarStatusViewTests.swift Adds regression coverage for stable fitting width and single-line truncation under constraint.
supacode/Features/Repositories/Views/WorktreeDetailView.swift Removes duplicated horizontal padding around the principal status item.
supacode/Features/Repositories/Views/ToolbarStatusView.swift Introduces bounded width + truncation and adds tooltip/accessibility text for toast messages.
supacode/Features/Repositories/Views/PullRequestStatusButton.swift Ensures PR/check summary text tail-truncates within the constrained status slot.
docs/components/custom-actions.md Documents the existing “first three commands inline, rest in overflow” behavior.
docs/components/canvas.md Documents the bounded/compressible status area and truncation/hover behavior.
docs/.sync-meta.json Updates docs sync baseline commit/date and note to reflect the manual verification.
docs-ai/README.md Adds entry for the 046 toolbar status layout stability record.
docs-ai/046-toolbar-status-layout-stability/000-plan.md Records the plan/constraints and chosen approach for the status slot stabilization.
docs-ai/046-toolbar-status-layout-stability/001-action.md Records the implementation/verification log for the change.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@onevcat

onevcat commented Jul 13, 2026

Copy link
Copy Markdown
Owner

暂时保留现状。参看 #471 评论

@onevcat onevcat closed this Jul 13, 2026
@onevcat
onevcat deleted the relay/fix-54-optimize-toolbar-layout-jitter-and-statu branch August 18, 2026 14:34
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.

toolbar 布局抖动和优化

3 participants