Repository navigation
Let dock widgets render their own close button - #1612
Merged
Merged
Conversation
The dock panel overlaid its close button on the panel's top-right corner, on top of whatever the widget put there. Patch's chat header has its own controls in that corner, so the two collided. Every `portal.dock/project` component is now mounted with an `onClose` prop. A widget that declares `handlesClose: true` in its manifest renders its own close control, so the panel drops its overlay one. Widgets that don't set the flag keep the overlay, so this is backwards compatible. The lazy-load skeleton now mirrors the chat's vertical layout (top bar and empty state) rather than the old left rail.
2 of 3 tasks
🧪 Test Summary
Need another run? Use Re-run failed jobs: one shard costs a few minutes, the whole workflow about 26. |
yahyafakhroji
approved these changes
Oct 1, 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.
Problem
The dock panel puts its close button on top of the widget's top-right corner. Patch's chat now has a header with its own controls in that corner (datum-ui 3.4's vertical
AssistantWorkspace), so the two buttons sit on top of each other.Solution
Every
portal.dock/projectcomponent is now mounted with anonCloseprop. A widget that setshandlesClose: truein its manifest renders its own close control, and the panel then drops its overlay button. Widgets without the flag keep the overlay, so existing plugins are unaffected.DockProjectProperties.handlesCloseandDockWidgetPropsare defined intypes.tsand validated in the manifest schema.LazyPluginComponentforwards optionalcomponentPropsto the plugin component.DockWidgetPropslives here for now. It belongs in@datum-cloud/portal-plugin-sdkeventually, so plugins can import the type instead of copying it.Rollout
Merge and deploy this before releasing the assistant plugin change that sets
handlesClose(milo-os/assistant#113). An older portal ignores the flag and keeps its overlay button, which would then sit on top of the chat's new-chat button.Related: datum-cloud/datum-ui#228
Test plan
bun run typecheck, eslint, prettierbun test app/modules/plugins: 221 pass, including 2 new manifest schema tests (handlesCloseaccepted, non-boolean rejected)handlesClosestill gets the overlay close button