Dock the bottom bar in the open agent and refit the canvas#1709

merged1
main
agent-placement/4-dock
openedOct 13, 2026byNNick
View on GitHubGitHub import enabledPR last imported 21d ago

With the agent open, the canvas deploy bar docks above the agent's composer and takes the column's width. Closed, it goes back to the canvas. Servers has no bar.

How the bar moves. The shell passes the dock element down through an AgentDock context, and BottomBar portals into it when it's there. Only the bar's mount point moves; its state stays in the canvas, so a typed message is kept across the move. A deploy already running during the move has not been tried in a browser.

Refit. The canvas fits itself again every time React Flow measures a new width, whether the agent toggled or the window was resized. A node that holds the view turns this off.

  • Not fitView: over controlled nodes it waits for a node change that never comes.
  • Keyed on width alone. The first version also tracked whether the agent was open. A quick open and close then left every later toggle fitted to the previous width.

Tests: BottomBar.test.tsx covers the dock.

Checks

10 successful Β· 6 skipped
All checks passed
3ad871c
Synced from GitHub

Review in Change Stack β†’

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

βš™οΈ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f0ec763e-3d2b-4f72-8f16-d89e69a5975f
πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 99490c50fc92e2750d34a466d79da126a1129a64 and 8e5e5efe0ec6b7db4b6781ad396bd7c7722efa05.

πŸ“’ Files selected for processing (18)
  • dashboard/src/collections/data-boundaries.static.test.ts
  • dashboard/src/collections/data-sources.ts
  • dashboard/src/components/agent-sidebar/agent-dock.ts
  • dashboard/src/components/agent-sidebar/agent-panel.test.tsx
  • dashboard/src/components/agent-sidebar/agent-panel.tsx
  • dashboard/src/components/agent-sidebar/agent-sidebar.test.tsx
  • dashboard/src/components/agent-sidebar/agent-sidebar.tsx
  • dashboard/src/components/agent-sidebar/threads.queries.ts
  • dashboard/src/components/dashboard-shell.test.tsx
  • dashboard/src/components/dashboard-shell.tsx
  • dashboard/src/modules/agent/agent.functions.ts
  • dashboard/src/modules/agent/persistence.server.ts
  • dashboard/src/modules/agent/thread-title.test.ts
  • dashboard/src/modules/agent/thread-title.ts
  • dashboard/src/routes/_protected/cloud/$organizationSlug/_project/$projectSlug/$environmentSlug/-components/canvas/BottomBar.test.tsx
  • dashboard/src/routes/_protected/cloud/$organizationSlug/_project/$projectSlug/$environmentSlug/-components/canvas/BottomBar.tsx
  • dashboard/src/routes/_protected/cloud/$organizationSlug/_project/$projectSlug/$environmentSlug/-components/canvas/CanvasFlow.tsx
  • dashboard/src/styles.css
ascii
1 _______________________________________________
2< CodeRabbit: Because Jarvis was already taken. >
3 -----------------------------------------------
4 \
5 \ \
6 \ /\
7 ( )
8 .( o ).
✨ Finishing Touches
πŸ“ Generate docstrings
  • Commit to this branch
  • Create a new PR
πŸ§ͺ Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix Β· Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

Synced from GitHub

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

ReviewStatusCommitReview trigger
πŸ“ Code Reviewβœ… Completed 2026-10-13T06:13:23.840410Z8e5e5efNew commits
ℹ️ 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" or "@codex security review".

Codex reacts with πŸ‘€ while any review is running, comments if it has suggestions, and reacts with πŸ‘ once all reviews finish with no findings.

Cchatgpt-codex-connectorBotreviewed Β· 1 inline threadOct 13, 2026
Synced from GitHub

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9441ce188f

ℹ️ 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".

dashboard/src/components/agent-sidebar/agent-panel.tsxline 53Outdated Β· 9441ce1Open thread
……@@ -43,10 +43,12 @@ type PanelProps = {
49-export default function AgentPanel({ organizationSlug, scope, page, threadId, onChat }: PanelProps) {
51+export default function AgentPanel({ organizationSlug, scope, page, threadId, onChat, dock }: PanelProps) {
5052 const { data: threads } = useQuery(agentThreadsOptions(organizationSlug));
5153 const title = threads?.find((thread) => thread.threadId === threadId)?.title ?? "New chat";

P2 Badge Resolve titles for threads outside the recent list

When a valid older thread is opened via its saved URL or browser history after 30 newer chats exist, recentThreads omits it because of HISTORY_LIMIT, so this lookup fails and labels the loaded conversation β€œNew chat.” Include the currently requested thread in the title lookup or derive its title from the loaded transcript rather than treating every absent summary as a new conversation.

Useful? React with πŸ‘Β / πŸ‘Ž.

Fixed in 985f34ab7 on #1708, which this PR builds on. The title falls back to the loaded transcript's first user message, so an older chat outside the 30 in history keeps its title.

Cchatgpt-codex-connectorBotreviewed Β· 1 inline threadOct 13, 2026
Synced from GitHub

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e210b12d1b

ℹ️ 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".

……@@ -207,6 +212,28 @@ export function CanvasFlow({
226+ useEffect(() => {
227+ const previous = fittedWidth.current;
228+ fittedWidth.current = width;
229+ if (!previous || previous === width || !enabled) return;

P2 Badge Refit after the hidden canvas becomes visible

When the viewport crosses below 861px, the React Flow wrapper (hidden min-[861px]:block) is measured at width 0; this effect records that width after fitting against a zero-width canvas. When the viewport returns above the breakpoint, previous is therefore 0 and this guard skips the refit, leaving the desktop graph at the minimum zoom and offset calculated while hidden. Retain the last nonzero fitted width or reject a zero current width instead.

Useful? React with πŸ‘Β / πŸ‘Ž.

Fixed in c0eb641b1. A zero width no longer overwrites the last fitted width, so returning above the breakpoint refits against the real width.

Added 1 commit

  • Dock the bottom bar in the open agent and refit the canvas3ad871c