|
28 | 28 | sitting in" (`appraise-form.tsx:9-20`). The `?error=` redirect is the right |
29 | 29 | channel for a failure that arrives on page load, and the wrong one for a |
30 | 30 | rejection of a control that is 2,000px down a page full of open panels. Convert |
31 | | - the four field-level editors that reject on format — `setItemPriceAction`, |
32 | | - `setParticipantSharesAction`, `addFlatPoolAction`'s `total_invalid`, and |
33 | | - `addParticipantAction` — to return state through `useActionState` from a small |
34 | | - client leaf, the way `AppraiseForm` and `NoteForm` already do, and render the |
35 | | - message beside the field that produced it. `openInfoAction`'s five failure codes |
| 31 | + the field-level editors that reject on format — `setNameAction`, |
| 32 | + `setItemPriceAction`, `setParticipantSharesAction`, `addFlatPoolAction`'s |
| 33 | + `total_invalid`, and `addParticipantAction` — to return state through |
| 34 | + `useActionState` from a small client leaf, the way `AppraiseForm` and `NoteForm` |
| 35 | + already do, and render the message beside the field that produced it. `openInfoAction`'s five failure codes |
36 | 36 | are the harder case (they can't be predicted client-side); at minimum they should |
37 | 37 | not navigate, since the action persists nothing by its own docblock's argument. |
38 | 38 | Keep the redirect only for failures that genuinely have no form still on screen. |
|
132 | 132 | text." The primitive grew an empty-slot mode specifically so call sites could |
133 | 133 | mount unconditionally, and this page — the one with six of them — uses `&&` at |
134 | 134 | all six. |
135 | | -- **Fix:** Mount all six unconditionally and pass the empty value: |
| 135 | +- **Fix:** Mount them unconditionally and pass the empty value: |
136 | 136 | `<Notice tone="warn">{poolsWithUnresolvedItems.length > 0 ? <>…</> : ""}</Notice>`. |
137 | | - The `errorMessage` one at line 251 is the exception worth arguing — it arrives by |
138 | | - navigation, so the document is new either way — but the four derived warnings |
139 | | - (unresolved items, the two roster clashes, and the `dropped` report after the |
140 | | - `?dropped=` remount) all appear as a result of an action the operator just took |
141 | | - on a page that did not reload, and those are the ones the region exists for. |
| 137 | + Five of the six need it. The `errorMessage` one at line 251 is the single |
| 138 | + exception worth arguing — it arrives by navigation, so the document is new |
| 139 | + either way — but the other five all appear as a result of an action the |
| 140 | + operator just took on a page that did not reload, and those are the ones the |
| 141 | + region exists for: the unresolved-items warning, the two roster clashes |
| 142 | + (duplicate unresolved names, and names that are both linked and unlinked), the |
| 143 | + `dropped` report after the `?dropped=` remount, and the info notice saying |
| 144 | + repricing is closed while the operation is finalized. |
142 | 145 |
|
143 | 146 | ### 6. The pool-items table is the one table on the page that runs to hundreds of rows, and it is the one that gets no sticky header |
144 | 147 |
|
|
210 | 213 | specifically so "a client leaf can tell that apart from either of those" |
211 | 214 | (actions.ts:160-163), and nothing consumes it. |
212 | 215 | - **Fix:** Consume the `ok: true` the action already returns: render a |
213 | | - `role="status"` confirmation naming what was added ("pool 3 added, 4.82b ISK"), |
214 | | - and clear the textarea on success — the paste is persisted as `rawPaste` on the |
215 | | - pool by then, so nothing is lost by dropping it from the form, and an empty box |
216 | | - is the strongest available signal that the submit landed. |
| 216 | + `role="status"` confirmation saying the paste was appraised and added as a new |
| 217 | + pool, and clear the textarea on success — the paste is persisted as `rawPaste` |
| 218 | + on the pool by then, so nothing is lost by dropping it from the form, and an |
| 219 | + empty box is the strongest available signal that the submit landed. Naming the |
| 220 | + numbers ("pool 3 added, 4.82b ISK") would read better still, but |
| 221 | + `AppraiseActionState` is `{ ok: true; dropped }` and carries neither the pool |
| 222 | + index nor the total; either widen it to carry both, or keep the message to |
| 223 | + what the existing result can actually back. Do not write the numbers from |
| 224 | + anything the client already had — the whole point is to report what the server |
| 225 | + did. |
217 | 226 |
|
218 | 227 | ### 10. The notices name the affected items in the faintest, smallest type on the page |
219 | 228 |
|
|
0 commit comments