FE-1658: Dock the Petrinaut AI assistant on the right - #9659
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
PR SummaryMedium Risk Overview Adds UI/UX polish: float/dock header controls, draggable header + keyboard move, refreshed composer/header styling, Clear AI chat only when messages exist, focus on toggle, and transcript scroll confined to the panel. Docs and changeset updated; broad unit/integration test coverage for resize geometry, docking lifecycle, and shortcuts. Reviewed by Cursor Bugbot for commit 3089322. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
🟡 Changes recommended
The floating panel’s default position covers the canvas minimap.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds docked and movable floating layouts for Petrinaut’s AI assistant while preserving conversation state.
Changes:
- Adds dock/float controls, drag and keyboard positioning, resizing, and animations.
- Updates editor layout state and canvas insets.
- Adds tests, documentation, Storybook coverage, and a patch changeset.
File summaries
| File | Description |
|---|---|
.changeset/quiet-boats-dock.md |
Adds the package changeset. |
libs/@hashintel/petrinaut/docs/ai-assistant.md |
Documents docking and floating. |
libs/@hashintel/petrinaut/src/react/hooks/use-petrinaut-commands.test.tsx |
Updates context fixture. |
libs/@hashintel/petrinaut/src/react/hooks/use-petrinaut-mutations.test.tsx |
Updates context fixture. |
libs/@hashintel/petrinaut/src/react/state/editor-context.ts |
Adds assistant placement state. |
libs/@hashintel/petrinaut/src/react/state/editor-provider.tsx |
Implements placement updates and animation. |
libs/@hashintel/petrinaut/src/react/state/panel-defaults.ts |
Reduces the default assistant width. |
libs/@hashintel/petrinaut/src/ui/hooks/use-canvas-insets.test.ts |
Tests floating and docked insets. |
libs/@hashintel/petrinaut/src/ui/hooks/use-canvas-insets.ts |
Accounts for floating placement. |
libs/@hashintel/petrinaut/src/ui/views/Editor/editor-view.tsx |
Adds the dock column layout. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/experiments/experiments-story-fixtures.tsx |
Updates context fixture. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/ai-assistant-panel.test.tsx |
Updates context fixture. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/ai-assistant-panel.tsx |
Removes legacy offset handling. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/ai-assistant-panel/ai-assistant-contents.stories.tsx |
Adds floating-panel story coverage. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/ai-assistant-panel/ai-assistant-contents.test.tsx |
Tests state preservation across placement changes. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/ai-assistant-panel/ai-assistant-contents.tsx |
Implements the redesigned panel layouts. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/ai-assistant-panel/ai-assistant-contents/use-floating-position.ts |
Implements bounded pointer and keyboard movement. |
Review details
- Files reviewed: 17/17 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fac2c37. Configure here.

Summary
The Petrinaut AI assistant opens in a sidebar at the far right of the editor, reserving space beside the canvas and properties panel. The docked panel sits flush against the viewport, with square corners and a full-height divider.
Users can detach the assistant, move it by its header, and resize it from any edge or corner. Docking, floating, closing, and changing editor views preserve the draft, transcript, host controls, and active response.
9659-ai-sidebar.mp4
Links
Blocked by
Changes
Panel layout and controls
Header, composer, and resizing
Known issues
Test coverage
How to test
yarn workspace @hashintel/petrinaut devand open Petrinaut → With AI Assistant