Files
KomediruzeckiandGitHub 08ad641383 feat(forms): housing, portfolio, tags, recurring and onboarding say what is wrong at the field (slice 5 of 6) (#614)
Housing, Portfolio, Tags, the Recurring dialog, the subscription catalog and scan, and the setup
wizard move onto the form kit from #602: a refused entry is said under the field that is wrong, in
the same words in cloud and local-first. Both runtimes run one set of rules from shared/ for a
tag, a housing expense, a holding and a recurring rule, and answer a refusal with 400
{ error, fields }. An edit checks and writes only what it changes, so a row an older version
stored can still be edited.

- A tag name that is blank, over 50 characters, or another tag's in other case is refused at name.
  A colour must be #RRGGBB; a tag created without one takes the palette's next colour, and an edit
  without one keeps it.
- A housing expense is refused at the field: a name up to 100 characters, six types, an amount to
  the cent, a real due month and a day that month has (29 February taken). One posted without a
  due month falls due this month.
- A holding needs a ticker up to 20 characters, stored in capitals, shares and a price above zero
  and below one trillion, and a real date. The edit dialog sends back what is stored, and a buy
  merges only into the open profile's holding.
- A recurring rule needs a description, an amount to the cent, a type, a frequency and a next date.
  Deleting one the profile does not have is a 404. A rule's period is added once, and a second add
  of it is a 409 in both runtimes. Local-first's upcoming list is the Worker's.
- Another profile's tag, category or account is a 400 at the field it names.
- A new tag and a new recurring rule answer 201 in both runtimes, as housing does.
- Deleting a housing expense, holding, tag or recurring rule another tab already deleted says so
  and reloads the list.
- MCP's upsert_tag_rule finds and creates tags by the tag rules.
- The contract suite settles 12 pins (31 to 19).

Slice 5 of 6 in docs/plans/2026-10-07-form-errors.md.
2026-10-10 09:19:28 +02:00

21 lines
773 B
TypeScript

/**
* The app's categorical palette, the "constellation": azure-anchored, with warm dawn and mint
* counterpoints, tuned to read on both the Orbit (dark) and Dawn (light) grounds.
*
* It lives here because both runtimes need it: the page draws swatches and charts from it
* (frontend/src/core/brandPalette.ts, as CATEGORY_PALETTE), and a tag created without a colour
* takes the next of these, on the Worker and in local-first alike (shared/tagSchema.ts).
*/
export const CONSTELLATION: readonly string[] = [
'#6e9bff', // azure
'#f0a860', // dawn
'#59d2a2', // mint
'#e0708a', // rose
'#93b4ff', // azure bright
'#e8c268', // amber
'#4fb3d9', // cyan
'#c9a0ff', // violet
'#7182a8', // mist (also the "Other" bucket)
'#3b6fe0', // azure deep
];