Skip to content

fix: PinnedTodoPanel ignores narrow mode width setting#13127

Merged
kangfenmao merged 1 commit intomainfrom
DeJeune/todo-panel-width-fix
Mar 5, 2026
Merged

fix: PinnedTodoPanel ignores narrow mode width setting#13127
kangfenmao merged 1 commit intomainfrom
DeJeune/todo-panel-width-fix

Conversation

@DeJeune
Copy link
Copy Markdown
Collaborator

@DeJeune DeJeune commented Mar 1, 2026

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 PinnedTodoPanel respects 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 in NarrowLayout inside their own components. The PinnedTodoPanel was missing this wrapper, so it was the only element that didn't respond to the narrow mode toggle.

The fix wraps PinnedTodoPanel in NarrowLayout at the same level as the other components in Chat.tsx, following the existing pattern.

The following tradeoffs were made: None — this follows the established pattern exactly.

The following alternatives were considered: Moving the NarrowLayout wrapper inside PinnedTodoPanel.tsx itself, but the existing convention is to apply NarrowLayout at 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

Release note

NONE

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]>
@DeJeune DeJeune requested a review from kangfenmao March 1, 2026 12:47
@DeJeune DeJeune added this to the v1.7.22 milestone Mar 1, 2026
@kangfenmao kangfenmao merged commit 1f78eb7 into main Mar 5, 2026
11 checks passed
@kangfenmao kangfenmao deleted the DeJeune/todo-panel-width-fix branch March 5, 2026 02:04
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.

3 participants