Commit 303b129
fix(deployments): hide empty-state during load error (F1) (#200)
On a 429/5xx the DeploymentsPage catch handler sets items=[] (honest —
nothing loaded), so the "No deployments yet" create-CTA (deployments-empty)
rendered at the same time as the deployments-error banner: contradictory UX
that tells the user both "nothing here, create one" and "something went
wrong". Gate the empty-state on `!err` so the error banner is the sole
dominant signal during a load error. The genuine zero-deployments empty
state (no error) is unchanged and still shows the create CTA.
Found by the per-tier error-state matrix sweep (PR #199).
Tests (DeploymentsPage.test.tsx):
- error → error banner shown AND empty-state NOT shown (fails before fix)
- 429 → retry-hint banner, no empty row (fails before fix)
- genuine empty (no error, zero items) → create CTA still shown
- happy-path empty has no error banner
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 861f659 commit 303b129
2 files changed
Lines changed: 52 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
119 | 163 | | |
120 | 164 | | |
121 | 165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
242 | 249 | | |
243 | 250 | | |
244 | 251 | | |
| |||
0 commit comments