|
| 1 | +# No-Workspace Welcome Screen Design |
| 2 | + |
| 3 | +## Goal |
| 4 | + |
| 5 | +Improve the startup experience when there is no open workspace. |
| 6 | + |
| 7 | +Today the app immediately opens the workspace launch overlay when no workspace exists. This creates a hard interruption before the user has any stable landing state. The new behavior should give the user a lightweight default home, while preserving the existing workspace launch flow. |
| 8 | + |
| 9 | +## Decision |
| 10 | + |
| 11 | +Adopt a lightweight welcome screen as the default empty state. |
| 12 | + |
| 13 | +- If there is no open workspace, the app lands on a welcome screen instead of auto-opening the launch overlay. |
| 14 | +- The existing workspace launch overlay remains the way to create or attach a workspace, but it becomes user-triggered. |
| 15 | +- The workspace launch overlay must become dismissible. |
| 16 | +- The history drawer remains available from the empty state so archived sessions can be restored without first creating a workspace. |
| 17 | + |
| 18 | +This is intentionally smaller than a full home dashboard. It avoids introducing a new route or a second onboarding system. |
| 19 | + |
| 20 | +## User Experience |
| 21 | + |
| 22 | +### Empty startup state |
| 23 | + |
| 24 | +When bootstrap completes and there are no open workspaces: |
| 25 | + |
| 26 | +- show the top bar |
| 27 | +- do not auto-open the workspace launch overlay |
| 28 | +- render a centered welcome screen in the workspace content area |
| 29 | + |
| 30 | +The welcome screen should present: |
| 31 | + |
| 32 | +- a title focused on the Claude workflow |
| 33 | +- one short description line |
| 34 | +- a primary action to open the workspace picker |
| 35 | +- a secondary action to open session history |
| 36 | +- a low-emphasis action to open settings |
| 37 | + |
| 38 | +Recommended copy direction: |
| 39 | + |
| 40 | +- title: "Start a Claude workspace" |
| 41 | +- body: "Open a local repository, connect a remote repo, or restore a previous Claude session." |
| 42 | + |
| 43 | +### Launch overlay behavior |
| 44 | + |
| 45 | +The workspace launch overlay should still open from: |
| 46 | + |
| 47 | +- the top-bar add-workspace button |
| 48 | +- the welcome screen primary action |
| 49 | + |
| 50 | +The overlay must gain: |
| 51 | + |
| 52 | +- a close button in the header |
| 53 | +- `Esc` to close |
| 54 | +- backdrop click to close |
| 55 | + |
| 56 | +Closing the overlay returns the user to the welcome screen when no workspace exists. |
| 57 | + |
| 58 | +### History behavior |
| 59 | + |
| 60 | +From the welcome screen, the user can open the history drawer directly. |
| 61 | + |
| 62 | +- If history exists, the drawer opens normally. |
| 63 | +- If history is empty, the action may be hidden or disabled. |
| 64 | + |
| 65 | +This preserves the new archive-and-restore workflow without forcing a new workspace first. |
| 66 | + |
| 67 | +## State And Data Flow |
| 68 | + |
| 69 | +### Workbench state normalization |
| 70 | + |
| 71 | +Current normalization opens the overlay by default when there is no meaningful workspace history. That behavior should be removed. |
| 72 | + |
| 73 | +Required change: |
| 74 | + |
| 75 | +- `normalizeWorkbenchState` should no longer force `overlay.visible = true` for the empty state |
| 76 | +- empty state should default to `overlay.visible = false` |
| 77 | + |
| 78 | +### View state |
| 79 | + |
| 80 | +Introduce a derived UI condition in `WorkspaceScreen`: |
| 81 | + |
| 82 | +- welcome screen visible when `bootstrapReady` is true, `state.tabs.length === 0`, and `state.overlay.visible === false` |
| 83 | + |
| 84 | +The workspace shell should be considered ready when either: |
| 85 | + |
| 86 | +- there is at least one workspace tab |
| 87 | +- the launch overlay is visible |
| 88 | +- the welcome screen is visible |
| 89 | + |
| 90 | +This prevents a blank screen while bootstrap is already complete. |
| 91 | + |
| 92 | +### Runtime validation |
| 93 | + |
| 94 | +Runtime validation should continue to happen only when the user actually begins workspace launch. |
| 95 | + |
| 96 | +The welcome screen itself must not trigger runtime validation. |
| 97 | + |
| 98 | +## Component Changes |
| 99 | + |
| 100 | +### New welcome screen component |
| 101 | + |
| 102 | +Add a small empty-state component, likely under workspace or components: |
| 103 | + |
| 104 | +- receives translator and action callbacks |
| 105 | +- visually simple, no new page route |
| 106 | +- should match current flat, compact product styling |
| 107 | + |
| 108 | +Suggested actions: |
| 109 | + |
| 110 | +- `onOpenWorkspacePicker` |
| 111 | +- `onOpenHistory` |
| 112 | +- `onOpenSettings` |
| 113 | + |
| 114 | +### Workspace launch overlay |
| 115 | + |
| 116 | +Add: |
| 117 | + |
| 118 | +- `onClose` |
| 119 | +- top-right close affordance |
| 120 | +- optional backdrop click close behavior |
| 121 | + |
| 122 | +The component should remain otherwise unchanged to minimize risk. |
| 123 | + |
| 124 | +### Top bar |
| 125 | + |
| 126 | +When there are no workspace tabs: |
| 127 | + |
| 128 | +- keep the top bar visible |
| 129 | +- do not render an empty tab strip that implies a missing selected tab |
| 130 | +- retain useful global actions such as settings and quick actions |
| 131 | +- keep history entry available if desired by product styling |
| 132 | + |
| 133 | +The add-workspace entry should remain a valid way to open the launch overlay. |
| 134 | + |
| 135 | +## Error Handling |
| 136 | + |
| 137 | +- If history loading fails, the empty state still renders and the user can open a workspace normally. |
| 138 | +- If runtime validation fails after the user opens the picker, existing runtime validation overlay behavior remains unchanged. |
| 139 | +- If the user closes the launch overlay after a runtime validation pass, they return to the welcome screen and can retry later. |
| 140 | + |
| 141 | +## Testing |
| 142 | + |
| 143 | +Add or update tests for: |
| 144 | + |
| 145 | +1. no-workspace bootstrap shows welcome screen instead of auto-opening the launch overlay |
| 146 | +2. clicking welcome-screen primary action opens the launch overlay |
| 147 | +3. launch overlay close button hides the overlay and returns to welcome screen |
| 148 | +4. closing the last workspace returns to the welcome screen |
| 149 | +5. welcome-screen history action opens the history drawer |
| 150 | +6. runtime validation still occurs only after user-initiated workspace launch |
| 151 | + |
| 152 | +## Scope Boundaries |
| 153 | + |
| 154 | +Included: |
| 155 | + |
| 156 | +- empty-state welcome screen |
| 157 | +- dismissible launch overlay |
| 158 | +- welcome entry points into history and settings |
| 159 | + |
| 160 | +Not included: |
| 161 | + |
| 162 | +- a full dashboard homepage |
| 163 | +- recent workspace cards |
| 164 | +- onboarding tutorial flows |
| 165 | +- changes to workspace creation backend behavior |
| 166 | +- changes to history restore semantics |
| 167 | + |
| 168 | +## Rationale |
| 169 | + |
| 170 | +This design solves the immediate UX issue with minimal architecture churn. |
| 171 | + |
| 172 | +- It removes the forced interruption at startup. |
| 173 | +- It keeps the current workspace launch system intact. |
| 174 | +- It gives the user a stable empty state. |
| 175 | +- It supports the new session history feature as a first-class recovery path. |
| 176 | + |
| 177 | +That makes it the smallest change that materially improves the product experience. |
0 commit comments