Skip to content

chore: simplify AgentRow interface #18087

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 29, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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 lint issues
  • Loading branch information
BrunoQuaresma committed May 28, 2025
commit 359160006043cb4d22440cd24eb20bd31446c365
24 changes: 0 additions & 24 deletions site/src/modules/resources/AgentRow.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ const meta: Meta<typeof AgentRow> = {
logs_length: logs.length,
},
workspace: M.MockWorkspace,
showApps: true,
initialMetadata: defaultAgentMetadata,
},
decorators: [withProxyProvider(), withDashboardProvider, withWebSocket],
Expand All @@ -121,24 +120,6 @@ type Story = StoryObj<typeof AgentRow>;

export const Example: Story = {};

export const HideSSHButton: Story = {
args: {
hideSSHButton: true,
},
};

export const HideVSCodeDesktopButton: Story = {
args: {
hideVSCodeDesktopButton: true,
},
};

export const NotShowingApps: Story = {
args: {
showApps: false,
},
};

export const BunchOfApps: Story = {
args: {
agent: {
Expand All @@ -155,7 +136,6 @@ export const BunchOfApps: Story = {
],
},
workspace: M.MockWorkspace,
showApps: true,
},
};

Expand Down Expand Up @@ -246,17 +226,13 @@ export const Outdated: Story = {
args: {
agent: M.MockWorkspaceAgentOutdated,
workspace: M.MockWorkspace,
serverVersion: "v99.999.9999+c1cdf14",
serverAPIVersion: "1.0",
},
};

export const Deprecated: Story = {
args: {
agent: M.MockWorkspaceAgentDeprecated,
workspace: M.MockWorkspace,
serverVersion: "v99.999.9999+c1cdf14",
serverAPIVersion: "2.0",
},
};

Expand Down
159 changes: 0 additions & 159 deletions site/src/modules/resources/AgentRow.test.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion site/src/modules/resources/AgentRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import { TerminalLink } from "./TerminalLink/TerminalLink";
import { VSCodeDesktopButton } from "./VSCodeDesktopButton/VSCodeDesktopButton";
import { useAgentLogs } from "./useAgentLogs";

export interface AgentRowProps {
interface AgentRowProps {
agent: WorkspaceAgent;
workspace: Workspace;
template: Template;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const meta: Meta<typeof PortForwardPopoverView> = {
args: {
agent: MockWorkspaceAgent,
template: MockTemplate,
workspaceID: MockWorkspace.id,
workspace: MockWorkspace,
portSharingControlsEnabled: true,
host: "coder.com",
},
Expand Down
6 changes: 3 additions & 3 deletions site/src/modules/resources/PortForwardPopoverView.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ describe("Port Forward Popover View", () => {
<PortForwardPopoverView
agent={MockWorkspaceAgent}
template={MockTemplate}
workspaceID={MockWorkspace.id}
listeningPorts={MockListeningPortsResponse.ports}
portSharingControlsEnabled
host="host"
username="username"
workspaceName="workspaceName"
workspace={MockWorkspace}
sharedPorts={[]}
refetchSharedPorts={jest.fn()}
/>
</QueryClientProvider>,
);
Expand Down
2 changes: 0 additions & 2 deletions site/src/modules/resources/SSHButton/SSHButton.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@ export const Closed: Story = {
args: {
workspaceName: MockWorkspace.name,
agentName: MockWorkspaceAgent.name,
sshPrefix: "coder.",
},
};

export const Opened: Story = {
args: {
workspaceName: MockWorkspace.name,
agentName: MockWorkspaceAgent.name,
sshPrefix: "coder.",
},
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
Expand Down
2 changes: 0 additions & 2 deletions site/src/pages/WorkspacePage/Workspace.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ export const Running: Story = {
},
handleStart: action("start"),
handleStop: action("stop"),
buildInfo: Mocks.MockBuildInfo,
template: Mocks.MockTemplate,
},
};
Expand Down Expand Up @@ -219,7 +218,6 @@ export const RunningWithAppStatuses: Story = {
},
handleStart: action("start"),
handleStop: action("stop"),
buildInfo: Mocks.MockBuildInfo,
template: Mocks.MockTemplate,
},
};
Expand Down
Loading