Skip to content

feat(site): add loading <Spinner /> to AgentRow#24825

Merged
jeremyruppel merged 3 commits into
mainfrom
jeremy/devex-134-introduce-indicator-for-loading-scripts
May 1, 2026
Merged

feat(site): add loading <Spinner /> to AgentRow#24825
jeremyruppel merged 3 commits into
mainfrom
jeremy/devex-134-introduce-indicator-for-loading-scripts

Conversation

@jeremyruppel
Copy link
Copy Markdown
Contributor

Adds a <Spinner /> next to the log count during agent startup.

Also, there was some complexity in sizing the spinner because <Badge /> automatically sizes any svgs it contains to size-icon-xs. In order to maintain the svg sizing inside existing Badges across the site, this introduces a new svgSize prop that defaults to xs. Existing consumers will still get [&_svg]:size-icon-xs regardless of the Badge size, but can now be overridden to sm or lg (there is no md).

Also also fixes a tiny spacing issue with the warning triangle 🕵️‍♂️

Screenshot 2026-04-29 at 3 24 35 PM

Adds a `<Spinner />` next to the log count during agent startup.

Also, there was some complexity in sizing the spinner  because `<Badge
/>` automatically sizes any `svg`s it contains to `size-icon-xs`. In order
to maintain the `svg` sizing inside existing Badges across the site,
this introduces a new `svgSize` prop that defaults to `xs`. Existing
consumers will still get `[&_svg]:size-icon-xs` regardless of the Badge size,
but can now be overridden to `sm` or `lg` (there is no `md`).

Also also fixes a tiny spacing issue with the warning triangle
:male_detective:
Comment thread site/src/modules/resources/AgentRow.tsx Outdated
{healthIssues.length > 0 && (
<Badge variant="warning" size="xs" className="ml-1.5">
<TriangleAlertIcon />
<TriangleAlertIcon className="-ml-0.5" />
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.

once you see it you can't unsee it

args: {
agent: {
...M.MockWorkspaceAgent,
...M.MockWorkspaceAgentReady,
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.

several of these stories used MockWorkspaceAgent straight up, which gives them the agent lifecycle value of "starting", which shows the new spinner. in order to minimize the amount of changes to existing stories, I'm making a couple of these show the explicit "ready" lifecycle state. the alternative would be to add actual logs/log_length to these stories and keep them in the "starting" state, but that would blow up the visual diffs. I'm happy to change it though if anyone thinks adding logs to these stories and keeping them in "starting" would be more correct

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.

Sounds good to me, I am adding some logs in my errors PR so doing it this way probably avoids conflicts with me as well 😆

@jeremyruppel jeremyruppel requested a review from code-asher April 29, 2026 19:40
Comment thread site/src/components/Badge/Badge.tsx Outdated
@jeremyruppel jeremyruppel requested a review from aslilac April 30, 2026 17:21
@jeremyruppel
Copy link
Copy Markdown
Contributor Author

similar to the AgentRow stories, the Workspace stories were affected by this change and exposed some incorrect args. this latest commit (0084fc6) adds explicit agent args and the appropriate lifecycle state

args: {
agent: {
...M.MockWorkspaceAgent,
...M.MockWorkspaceAgentReady,
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.

Sounds good to me, I am adding some logs in my errors PR so doing it this way probably avoids conflicts with me as well 😆

args: {
...Running.args,
workspace: Mocks.MockStoppedWorkspace,
workspace: {
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.

Could/should we fix the original entities?

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.

hrm yeah, I thought about that but I settled on this thinking the original entities would be even more visual diff churn, but idk I don't feel strongly about that at all. I can totally do that if you'd prefer!

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.

I think it might be worth it! My thinking is that if there is visual churn it probably means those tests were also incorrect.

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.

I have battled the UI Tests and I have prevailed. fixed!

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.

You are the best!

@jeremyruppel jeremyruppel force-pushed the jeremy/devex-134-introduce-indicator-for-loading-scripts branch 3 times, most recently from 8447c4a to 170bf8e Compare May 1, 2026 14:39
…y in health badge

Change MockWorkspaceAgent default lifecycle_state from "starting" to
"ready", and update Mock*Workspace entities to carry correct agent
lifecycle states for their scenario. Also fix AgentRow health issues
badge to respect issue severity, using info styling for info-level
issues instead of always rendering as warning.

Generated by Coder Agent, reviewed by Jeremy Ruppel.
@jeremyruppel jeremyruppel force-pushed the jeremy/devex-134-introduce-indicator-for-loading-scripts branch from 170bf8e to 1803bc5 Compare May 1, 2026 14:49
@jeremyruppel jeremyruppel merged commit 8709d42 into main May 1, 2026
27 checks passed
@jeremyruppel jeremyruppel deleted the jeremy/devex-134-introduce-indicator-for-loading-scripts branch May 1, 2026 14:57
@github-actions github-actions Bot locked and limited conversation to collaborators May 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants