Skip to content

fix(workspaces): empty state + disabled input when workspace has no harness#62

Merged
DIodide merged 1 commit into
stagingfrom
fix/workspace-no-harness-empty-state
Apr 30, 2026
Merged

fix(workspaces): empty state + disabled input when workspace has no harness#62
DIodide merged 1 commit into
stagingfrom
fix/workspace-no-harness-empty-state

Conversation

@DIodide

@DIodide DIodide commented Apr 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • When a workspace was selected with no harness attached, the chat page rendered the generic EmptyChat plus a fully interactive ChatInput whose handleSend silently no-oped — the user could type and click send with no feedback.
  • Adds a dedicated NoHarnessAttachedState screen that names the active workspace and provides an "Attach a harness" CTA. The CTA opens the existing edit-workspace dialog (where the harness selector already lives) by plumbing a pendingEditWorkspaceId request through WorkspaceSidebar.
  • Disables the chat input (textarea + send button) whenever !activeHarness, with a context-aware placeholder:
    • no workspace selected → "Select a workspace to start chatting"
    • workspace without harness → "Attach a harness to this workspace to start chatting"

Files

  • apps/web/src/routes/workspaces/index.tsx
    • new NoHarnessAttachedState screen (mirrors the visual language of EmptyWorkspaceState, uses the Wrench icon)
    • new render branch: !activeWorkspace → EmptyWorkspaceState, !activeHarness → NoHarnessAttachedState, else conversation/empty-chat
    • ChatInput gains disabled and placeholder props; both wired into the textarea and send button
    • WorkspaceSidebar gains pendingEditWorkspaceId / onPendingEditConsumed props and a small effect that opens the rename dialog when triggered externally

Test plan

  • Create a workspace with no harness attached, navigate to it
    • The center pane shows the new "No harness attached" screen with the workspace name
    • Clicking Attach a harness opens the sidebar (if collapsed) and the Edit Workspace dialog with the harness selector focused
    • The chat textarea is disabled and shows "Attach a harness to this workspace to start chatting"
    • The send button stays disabled even after typing (it shouldn't be possible to type, but the guard belt-and-suspenders)
  • Attach a harness from the dialog → empty-chat + interactive input return as expected
  • No regressions on workspaces that already have a harness
  • No regression on the !activeWorkspace path (EmptyWorkspaceState still renders, input shows "Select a workspace to start chatting")

…arness

Previously, selecting a workspace with no harness attached rendered the
generic EmptyChat plus a fully interactive ChatInput whose handleSend
silently no-oped — the user could type and click send with no feedback.

Adds a dedicated NoHarnessAttachedState screen that names the workspace
and CTAs into the existing edit-workspace dialog (plumbed through
WorkspaceSidebar via pendingEditWorkspaceId), and disables the chat
textarea + send button with a context-aware placeholder when no harness
is attached (or no workspace is selected).
@DIodide DIodide merged commit 2a17e19 into staging Apr 30, 2026
4 checks passed
@DIodide DIodide deleted the fix/workspace-no-harness-empty-state branch April 30, 2026 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant