Skip to content

refactor(web): self-contain composer context strip visibility in BranchToolbar (#436) - #721

Merged
rynfar merged 1 commit into
pylonfrom
refactor/issue-436-composer-context-strip-visibility
Sep 21, 2026
Merged

rynfar merged 1 commit into
pylonfrom
refactor/issue-436-composer-context-strip-visibility

Conversation

@rynfar

@rynfar rynfar commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #436

Summary

Previously, ChatView mirrored the internal visibility rules of every child inside BranchToolbar (showGitControls, showEnvironmentIndicator, hostsRestingComposerControls, restingComposerControlsVisible, hasCapacityReading) to decide whether to mount and display the composer context strip. This duplication broke whenever children changed their rendering rules or during rollbacks.

This PR refactors BranchToolbar to self-contain its content measurement and visibility:

  • BranchToolbar measures its laid-out DOM children via resolveContextStripHasContent and reports changes upward via onContextStripVisibilityChange.
  • Provides resolveInitialContextStripVisibility to avoid layout shift on initial render.
  • Simplifies ChatView by removing duplicate child flags and resolveComposerContextStripVisibility.
  • Updates tests accordingly.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@vercel

vercel Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
pylon-marketing Ignored Ignored Preview Sep 21, 2026 10:44pm UTC

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Sep 21, 2026
@rynfar
rynfar merged commit cd4e425 into pylon Sep 21, 2026
19 checks passed
@rynfar
rynfar deleted the refactor/issue-436-composer-context-strip-visibility branch September 21, 2026 22:52
@github-actions

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.9 KiB 14.0 KiB +20 B (+0.1%) 15.1 KiB ✅
Codex Thread snapshot wire 7.2 KiB 7.2 KiB +2 B (+0.0%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.7 KiB 6.7 KiB +18 B (+0.3%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 58.0 KiB 58.0 KiB 0 B (0.0%) 66.4 KiB ✅
Codex Live turn messages 9 9 0 (0.0%) 21 ✅
Claude Total thread wire 14.0 KiB 13.9 KiB −35 B (−0.2%) 15.1 KiB ✅
Claude Thread snapshot wire 7.2 KiB 7.2 KiB −7 B (−0.1%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.8 KiB 6.7 KiB −28 B (−0.4%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 58.9 KiB 58.9 KiB 0 B (0.0%) 66.4 KiB ✅
Claude Live turn messages 9 9 0 (0.0%) 21 ✅

Baseline: a3d6f94 · PR result: e83fde4 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 115.6 KiB
  • Claude decoded thread snapshot: 116.3 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

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

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

web: composer context strip visibility is modelled in the parent, one flag per child

1 participant