Skip to content

Conversation

@DanielleMaywood
Copy link
Contributor

@DanielleMaywood DanielleMaywood commented Nov 18, 2025

Refactors Task page UI to show startup script errors as compact warning buttons in the topbar rather than blocking content banners.

Changes

  • New component: TaskStartupWarningButton - compact amber warning button with tooltip
  • Topbar integration: Warning button placed left of Prompt button
  • Non-blocking: Tasks with startup errors now show full split-view interface
  • States handled: start_error and start_timeout

Implementation Details

  • Component accepts lifecycleState prop (focused API, easier testing)
  • Returns null when no warning needed (seamless topbar integration)
  • Tooltip contains error message + docs link (250ms delay, matches Prompt button UX)
  • Uses shared Link component for consistent styling

Files Modified

  • site/src/pages/TaskPage/TaskStartupWarningButton.tsx (new)
  • site/src/pages/TaskPage/TaskStartupWarningButton.stories.tsx (new)
  • site/src/pages/TaskPage/TaskTopbar.tsx (added button)
  • site/src/pages/TaskPage/TaskPage.tsx (removed blocking states)

Closes #20418

Add warning alerts to the Task Page when workspace startup scripts
fail or timeout. The alerts display inline above the log viewer to
maintain debugging context while providing helpful documentation links.

- Create TaskStartupAlert component with error and timeout variants
- Integrate alert into TaskStartingAgent component
- Extend TaskPage logic to render TaskStartingAgent for error states
- Add Storybook stories for component and full page integration
- Follow existing pattern from TerminalAlerts component

The alerts are dismissible and link to troubleshooting documentation:
- /admin/templates/troubleshooting#startup-script-exited-with-an-error
- /admin/templates/troubleshooting#startup-script-issues
- /admin/templates/troubleshooting#your-workspace-may-be-incomplete
@DanielleMaywood DanielleMaywood force-pushed the feat/task-page-startup-error-alert branch from 6d275c1 to 2be4511 Compare November 18, 2025 13:34
@DanielleMaywood DanielleMaywood marked this pull request as ready for review November 18, 2025 14:01
…orkspace'

- Update all title attributes to use sentence case (capitalize first word only)
- Change 'The workspace' to 'A workspace' in alert messages
Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

I'm so glad we have these cases covered with Storybook.

- Convert TaskStartupAlert from blocking banner to warning button with tooltip
- Move button to topbar, positioned left of Prompt button
- Change from agent-based to task.workspace_agent_lifecycle property
- Remove start_error and start_timeout from blocking states
- Extract shared StartupWarningButtonBase component to eliminate duplication
- Update Storybook stories for new button-based UI
- Users can now access full task interface during startup errors

This improves UX by making startup warnings non-intrusive while still
visible and accessible via hover tooltip with documentation links.
Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

LGTM 👍

- Renamed TaskStartupAlert.tsx to TaskStartupWarningButton.tsx to match exported component name
- Changed prop from 'task: Task' to 'lifecycleState: WorkspaceAgentLifecycle | null' for cleaner API
- Refactored conditional logic to use switch statement instead of if statements
- Updated TaskTopbar.tsx to pass lifecycleState directly
- Updated all Storybook stories to use new lifecycleState prop
- Removed unnecessary MockTask dependency from stories
- Make lifecycleState parameter optional
- Remove redundant early null guard (handled by switch default)
- Replace MUI Link with our own Link component for consistent styling and external icon
@DanielleMaywood DanielleMaywood merged commit 8e22cd7 into main Nov 19, 2025
48 of 50 checks passed
@DanielleMaywood DanielleMaywood deleted the feat/task-page-startup-error-alert branch November 19, 2025 11:44
@github-actions github-actions bot locked and limited conversation to collaborators Nov 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tasks: show error on task view when startup script / workspace is unhealthy

4 participants