Skip to content

🤖 refactor: encode chat layout lanes#3385

Open
ammar-agent wants to merge 1 commit into
mainfrom
refactor/chat-layout-lanes
Open

🤖 refactor: encode chat layout lanes#3385
ammar-agent wants to merge 1 commit into
mainfrom
refactor/chat-layout-lanes

Conversation

@ammar-agent
Copy link
Copy Markdown
Collaborator

@ammar-agent ammar-agent commented May 25, 2026

Summary

Encode chat layout ownership with semantic transcript-tail and composer-decoration lanes. The shared lane implementation now owns each lane's alignment, data-component, and scroll-anchoring policy, while callers create lane-specific items through typed factories.

Background

Follow-up to #3383. That fix moved the concurrent local-agent warning out of the transcript tail; this refactor makes the same mistake harder to repeat by removing low-level layout knobs from ChatPane call sites and requiring new layout chrome to explicitly choose a lane.

Implementation

  • Added lane-specific stack item factories for transcript-tail and composer-decoration entries.
  • Replaced the generic LayoutStackLane public API with TranscriptTailStackLane and ChatInputDecorationStackLane wrappers.
  • Centralized lane policy so transcript-tail content keeps overflow anchoring disabled, while composer decorations stay outside the transcript scrollport.
  • Updated ChatPane and lane tests to use the semantic wrappers and factories.

Validation

  • bun test src/browser/components/ChatPane/LayoutStackLane.test.tsx
  • make typecheck
  • git diff --check
  • make static-check

Risks

Low-to-medium. This is intended as a structural refactor with no user-visible layout movement beyond the preceding #3383 change, but it touches shared chat chrome rendering and hydration height reservation tests. Regression risk is concentrated in transcript tail barriers and composer-adjacent banners.

Pains

This PR was initially opened as a stacked branch while #3383 was still open, then rebased onto main after #3383 merged to remove the temporary base-branch conflict.


Generated with mux • Model: openai:gpt-5.5 • Thinking: xhigh • Cost: $0.56

@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the semantic chat layout lane refactor. This PR is stacked on #3383 to keep the diff scoped while that fix remains open.

@ammar-agent ammar-agent force-pushed the refactor/chat-layout-lanes branch from dfc80d6 to 93a26d5 Compare May 25, 2026 21:18
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Rebased onto the updated #3383 branch to resolve the stacked PR merge conflict; local lane tests and static-check pass.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Base automatically changed from fix/concurrent-warning-layout-flash to main May 25, 2026 21:35
Centralize transcript-tail and composer-decoration layout policy behind semantic lane wrappers. Require layout chrome entries to use lane-specific factories so future banners must explicitly choose whether they belong inside the transcript scrollport or in stable composer chrome.

---

_Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$0.56`_

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=0.56 -->
@ammar-agent ammar-agent force-pushed the refactor/chat-layout-lanes branch from 93a26d5 to 62d4c2a Compare May 25, 2026 21:36
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Rebased onto main after #3383 merged; local lane tests and static-check pass on the new base.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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