refactor(site): demui PortForwardButton and popover view - #27786
Conversation
Migrate the port-forward popover off MUI and Emotion onto shadcn Select/FormField and Tailwind. Replaces FormControl, Select, MenuItem, TextField, Stack, and Link usage in `PortForwardButton` / `PortForwardPopoverView`, and updates the popover stories to match.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 88bfab222a
ℹ️ 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".
| disabled | ||
| title="This workspace template does not allow sharing ports outside of its organization." | ||
| > |
There was a problem hiding this comment.
Restore discoverable explanations for disabled share levels
When a template caps sharing at organization or authenticated, these options are disabled. SelectItem applies data-[disabled]:pointer-events-none, and Radix skips disabled options during keyboard navigation, so users cannot hover or focus the item to expose its native title. This removes the explanatory tooltip that existed before the migration; expose the restriction through a focusable tooltip target or persistent visible text.
AGENTS.md reference: site/AGENTS.md:L18-L19
Useful? React with 👍 / 👎.
| const isPortShareProtocol = ( | ||
| value: string, | ||
| ): value is WorkspaceAgentPortShareProtocol => | ||
| value === "http" || value === "https"; | ||
|
|
||
| const isPortShareLevel = ( | ||
| value: string, | ||
| ): value is WorkspaceAgentPortShareLevel => | ||
| WorkspaceAgentPortShareLevels.some((level) => level === value); | ||
|
|
||
| const isListeningPortProtocol = (value: string): value is "http" | "https" => | ||
| value === "http" || value === "https"; |
There was a problem hiding this comment.
How many of these helpers do we need
There was a problem hiding this comment.
Type-casting sucks 😔 AI is trying to be safe here, I can't blame it
Migrate the port-forward popover off MUI and Emotion onto shadcn Select/FormField and Tailwind.
Replaces FormControl, Select, MenuItem, TextField, Stack, and Link usage in
PortForwardButton/PortForwardPopoverView, and updates the popover stories to match.