fix: PinnedTodoPanel ignores narrow mode width setting#13127
Merged
kangfenmao merged 1 commit intomainfrom Mar 5, 2026
Merged
Conversation
The PinnedTodoPanel was not wrapped in NarrowLayout, causing it to stretch full width regardless of the narrow mode setting. This wraps it consistently with how Messages and Inputbar are constrained. Co-Authored-By: Claude Opus 4.6 <[email protected]>
GeorgeDong32
approved these changes
Mar 1, 2026
kangfenmao
approved these changes
Mar 5, 2026
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.
What this PR does
Before this PR:
The
PinnedTodoPanel(agent todo list) always stretched to the full width of the chat area, ignoring the narrow mode ("伸縮對話框") setting.After this PR:
The
PinnedTodoPanelrespects the narrow mode setting and constrains its width to 800px when narrow mode is active, consistent with the messages area and input bar.Why we need it and why it was done in this way
The messages (
Messages,AgentSessionMessages) and input bar (InputbarCore) are each wrapped inNarrowLayoutinside their own components. ThePinnedTodoPanelwas missing this wrapper, so it was the only element that didn't respond to the narrow mode toggle.The fix wraps
PinnedTodoPanelinNarrowLayoutat the same level as the other components inChat.tsx, following the existing pattern.The following tradeoffs were made: None — this follows the established pattern exactly.
The following alternatives were considered: Moving the
NarrowLayoutwrapper insidePinnedTodoPanel.tsxitself, but the existing convention is to applyNarrowLayoutat the usage site (as done for messages and inputbar), so we follow that pattern.Breaking changes
None.
Special notes for your reviewer
Single-file, minimal change. The import was reordered by ESLint auto-fix to maintain alphabetical order.
Checklist
/gh-pr-review,gh pr diff, or GitHub UI) before requesting review from othersRelease note