Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
51d076f
feat(site): expose workspace apps in chat workspace pill
DanielleMaywood Apr 13, 2026
057ac8d
test(site): add storybook stories for WorkspacePill
DanielleMaywood Apr 13, 2026
dd3f0be
refactor(site): drop appendChatIdToHref, match AgentRow pattern
DanielleMaywood Apr 13, 2026
da60ae8
chore(site): remove stale-prone comments from WorkspacePill
DanielleMaywood Apr 13, 2026
fd165c9
refactor(site): WorkspacePill owns its status display, eliminate Reac…
DanielleMaywood Apr 13, 2026
f366b30
fix(site): remove stray whitespace expression in ChatTopBar
DanielleMaywood Apr 13, 2026
ba6fda9
fix(site): update AgentChatPage story for meatball menu changes
DanielleMaywood Apr 13, 2026
3441075
refactor(site): use Popover styling from #24308 for WorkspacePill
DanielleMaywood Apr 13, 2026
9689199
refactor(site): move Copy SSH and View Workspace from meatball to pill
DanielleMaywood Apr 13, 2026
6610110
fix(site): flip chevron direction for top popover, suppress tooltip w…
DanielleMaywood Apr 13, 2026
20de227
fix(site): show all workspace apps in pill, not just external ones
DanielleMaywood Apr 13, 2026
9c4be48
fix(site): address self-review findings (separator, overflow, story)
DanielleMaywood Apr 13, 2026
29ae400
fix(site): address review feedback (folder, status indicator, null gu…
DanielleMaywood Apr 13, 2026
0dcd9bd
fix(site): address panel review feedback (dropdown, token guard, stor…
DanielleMaywood Apr 13, 2026
5d6aa30
fix(site): address self-review findings (mutation unmount, disabled s…
DanielleMaywood Apr 13, 2026
559e05b
fix(site): address self-review round 2 (tooltip, alt, folder fallback…
DanielleMaywood Apr 13, 2026
1b186da
refactor(site): inline cls variables and remove workspaceStatusDisplay
DanielleMaywood Apr 13, 2026
19ba116
refactor(site): extract StatusIcon component to deduplicate status ic…
DanielleMaywood Apr 13, 2026
a95bf52
fix(site): address R3 review feedback (shared status, mutation lift, …
DanielleMaywood Apr 14, 2026
831572d
fix(site/src/pages/AgentsPage): add external app disabled assertions,…
DanielleMaywood Apr 14, 2026
6373d75
fix(site/src/pages/AgentsPage): fix WithWorkspace story props, add en…
DanielleMaywood Apr 14, 2026
ef908e8
fix(site/src/pages/AgentsPage): useClipboard, restore Cursor, fix fak…
DanielleMaywood Apr 14, 2026
95d78c5
fix(site/src/pages/AgentsPage): remove builtin Cursor, fix clipboard/…
DanielleMaywood Apr 14, 2026
cff4e04
fix(site/src/pages/AgentsPage): assert href absence on disabled exter…
DanielleMaywood Apr 14, 2026
aedb81c
fix(site/src/pages/AgentsPage): group launch items above separator
DanielleMaywood Apr 14, 2026
ed94b48
fix(site/src/pages/AgentsPage): use consistent app names without Open…
DanielleMaywood Apr 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(site): address self-review round 2 (tooltip, alt, folder fallback…
…, running guard)

- Use fully controlled tooltip state to avoid Radix controlled/
  uncontrolled oscillation warning
- Add alt="" to ExternalImage in AppMenuItem (decorative, a11y)
- Change preferredFolder from ?? to || so empty-string repo roots
  fall through to expanded_directory
- Disable VS Code, app, and terminal menu items when workspace is
  not running
  • Loading branch information
DanielleMaywood committed Apr 13, 2026
commit 559e05b2b7f23091642ca41d583a543a47f83dba
2 changes: 1 addition & 1 deletion site/src/pages/AgentsPage/AgentChatPageView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ export const AgentChatPageView: FC<AgentChatPageViewProps> = ({
// for VS Code folder resolution (important for monorepos).
const preferredFolder = (() => {
const repoRoots = Array.from(gitWatcher?.repositories.keys() ?? []).sort();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like it could have unexpected consequences if gitWatcher is tracking multiple repositories? Your diff view shows one repo and then the editor or what not opens up in another.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely agree with you although that's the existing behavior.

-		// Prefer the active git repo root so VS Code opens to the
-		// actual project directory, falling back to the agent's
-		// configured directory.
-		const repoRoots = Array.from(gitWatcher.repositories.keys()).sort();
-		const folder = repoRoots[0] ?? workspaceAgent.expanded_directory;

We should definitely noodle on a better approach here.

return repoRoots[0] ?? workspaceAgent?.expanded_directory;
return repoRoots[0] || workspaceAgent?.expanded_directory;
})();

const workspaceRoute = workspace
Expand Down
36 changes: 28 additions & 8 deletions site/src/pages/AgentsPage/components/WorkspacePill.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ export const WorkspacePill: FC<WorkspacePillProps> = ({
folder,
}) => {
const [open, setOpen] = useState(false);
const [tooltipOpen, setTooltipOpen] = useState(false);
const isRunning = workspace.latest_build.status === "running";
const route = `/@${workspace.owner_name}/${workspace.name}`;

const { statusLabel, statusIcon } = getWorkspaceStatusDisplay(
Expand All @@ -83,7 +85,10 @@ export const WorkspacePill: FC<WorkspacePillProps> = ({

return (
<DropdownMenu open={open} onOpenChange={setOpen}>
<Tooltip open={open ? false : undefined}>
<Tooltip
open={tooltipOpen}
onOpenChange={(v) => setTooltipOpen(v && !open)}
>
<TooltipTrigger asChild>
<DropdownMenuTrigger asChild>
<button
Expand Down Expand Up @@ -123,6 +128,7 @@ export const WorkspacePill: FC<WorkspacePillProps> = ({
agent={agent}
chatId={chatId}
folder={folder}
isRunning={isRunning}
/>
)}
{hasVSCodeInsiders && (
Expand All @@ -133,6 +139,7 @@ export const WorkspacePill: FC<WorkspacePillProps> = ({
agent={agent}
chatId={chatId}
folder={folder}
isRunning={isRunning}
/>
)}
{userApps.map((app) => (
Expand All @@ -141,10 +148,15 @@ export const WorkspacePill: FC<WorkspacePillProps> = ({
app={app}
workspace={workspace}
agent={agent}
isRunning={isRunning}
/>
))}
{hasTerminal && (
<TerminalMenuItem workspace={workspace} agent={agent} />
<TerminalMenuItem
workspace={workspace}
agent={agent}
isRunning={isRunning}
/>
)}
{sshCommand && <CopySSHMenuItem sshCommand={sshCommand} />}
{hasItemsAboveSeparator && <DropdownMenuSeparator className="my-1" />}
Expand All @@ -166,7 +178,8 @@ const VSCodeMenuItem: FC<{
agent: WorkspaceAgent;
chatId: string;
folder?: string;
}> = ({ variant, label, workspace, agent, chatId, folder }) => {
isRunning: boolean;
}> = ({ variant, label, workspace, agent, chatId, folder, isRunning }) => {
const { mutate: generateKey, isPending } = useMutation({
Comment thread
DanielleMaywood marked this conversation as resolved.
Outdated
mutationFn: () => API.getApiKey(),
onSuccess: ({ key }) => {
Expand All @@ -189,7 +202,7 @@ const VSCodeMenuItem: FC<{
};

return (
<DropdownMenuItem onSelect={handleClick} disabled={isPending}>
<DropdownMenuItem onSelect={handleClick} disabled={isPending || !isRunning}>
<ExternalLinkIcon className="size-3.5" />
{label}
</DropdownMenuItem>
Expand All @@ -200,22 +213,27 @@ const AppMenuItem: FC<{
app: WorkspaceApp;
workspace: Workspace;
agent: WorkspaceAgent;
}> = ({ app, workspace, agent }) => {
isRunning: boolean;
}> = ({ app, workspace, agent, isRunning }) => {
const link = useAppLink(app, { workspace, agent });
Comment thread
DanielleMaywood marked this conversation as resolved.

const canClick =
!isExternalApp(app) || !needsSessionToken(app) || link.hasToken;

return (
<DropdownMenuItem asChild disabled={!canClick}>
<DropdownMenuItem asChild disabled={!canClick || !isRunning}>
<a
href={canClick ? link.href : undefined}
Comment thread
DanielleMaywood marked this conversation as resolved.
Outdated
onClick={link.onClick}
target="_blank"
rel="noreferrer"
>
{app.icon ? (
<ExternalImage src={app.icon} className="size-3.5 rounded-sm" />
<ExternalImage
src={app.icon}
alt=""
className="size-3.5 rounded-sm"
/>
) : (
<LayoutGridIcon className="size-3.5" />
)}
Expand All @@ -228,7 +246,8 @@ const AppMenuItem: FC<{
const TerminalMenuItem: FC<{
workspace: Workspace;
agent: WorkspaceAgent;
}> = ({ workspace, agent }) => {
isRunning: boolean;
}> = ({ workspace, agent, isRunning }) => {
const href = getTerminalHref({
username: workspace.owner_name,
workspace: workspace.name,
Expand All @@ -240,6 +259,7 @@ const TerminalMenuItem: FC<{
onSelect={() => {
openAppInNewWindow(href);
}}
disabled={!isRunning}
>
<SquareTerminalIcon className="size-3.5" />
Open Terminal
Expand Down