Design system: atomic levels enforced by lint, today page rebuilt #6

Merged
alex merged 19 commits from feat/design-system into feat/web-rewards 2026-10-31 08:59:35 +01:00
Owner

Stacked on #5.

  • @habitea/platform/frontend/ui, the design system, over Ionic:

    • atoms: hab-button, hab-badge (the reviewed rewrite: tone, variant, size; no base class, no wrapper element), hab-message, hab-stat, hab-text-field
    • molecules: hab-inline-form, hab-list-item
    • organisms: hab-list, hab-stat-group
    • templates: hab-page-layout
    • the design tokens (styles/tokens.css), which the app imports
  • Lint rules:

    • each level imports only lower levels;
    • the library stays presentational (no NGXS, Transloco, HTTP, contracts or feature code);
    • feature ui projects can't import @ionic/*.

    Tested with deliberately wrong imports at each level: every one was caught, and the allowed ones pass.

  • Today page: rebuilt as hab-page-layout filled with two feature organisms, hab-habit-row and hab-rewards-summary, plus design-system parts. The page is still the only component connected to the store.

  • Docs: CONVENTIONS §6.5 (atomic design, levels table, lint and review rules), §6.4 (where tokens live, literal class names), and the ARCHITECTURE 12.2 table.

Checked in the browser: same look; check-in, undo and starting a habit work; the earnings prediction updates (+10 nectar, pollen back to +0 once a new habit is due).

🤖 Generated with Claude Code

Stacked on #5. - **`@habitea/platform/frontend/ui`**, the design system, over Ionic: - atoms: `hab-button`, `hab-badge` (the reviewed rewrite: tone, variant, size; no base class, no wrapper element), `hab-message`, `hab-stat`, `hab-text-field` - molecules: `hab-inline-form`, `hab-list-item` - organisms: `hab-list`, `hab-stat-group` - templates: `hab-page-layout` - the design tokens (`styles/tokens.css`), which the app imports - **Lint rules:** - each level imports only lower levels; - the library stays presentational (no NGXS, Transloco, HTTP, contracts or feature code); - feature `ui` projects can't import `@ionic/*`. Tested with deliberately wrong imports at each level: every one was caught, and the allowed ones pass. - **Today page:** rebuilt as `hab-page-layout` filled with two feature organisms, `hab-habit-row` and `hab-rewards-summary`, plus design-system parts. The page is still the only component connected to the store. - **Docs:** CONVENTIONS §6.5 (atomic design, levels table, lint and review rules), §6.4 (where tokens live, literal class names), and the ARCHITECTURE 12.2 table. Checked in the browser: same look; check-in, undo and starting a habit work; the earnings prediction updates (+10 nectar, pollen back to +0 once a new habit is due). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
@habitea/platform/frontend/ui holds atoms, molecules, organisms and templates
over Ionic and the design tokens. Lint keeps each level to lower levels,
keeps the library presentational, and stops features importing Ionic. The
today page is rebuilt from it with two feature organisms, the habit row and
the rewards summary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
alex added 18 commits 2026-10-31 08:59:31 +01:00
Archiving stops tracking from the user's today: entries and renames are
refused, days before it are still judged, and the list leaves it out. Entry
handlers read the week start from the tracker instead of assuming Monday.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every Habits command now has a client use case: the domain refuses what the
server would, with the same codes, and the state shows the result at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New habit form (Signal Forms) for check, amount and avoid goals on daily,
weekday and weekly schedules; goal-aware rows (+1, I slipped, undo, period
progress); a habit page to log an amount, rename and archive; a settings page
with the tracker and vacations. ICU plurals through transloco-messageformat.
The design system gains number, date, segment and chip fields that work as
Signal Forms controls, a chip select, a section and a page back button.
Ionic's element resets move to the base layer so utilities apply.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keeper (stores, items, vitality from Rewards) and Hive (queen genome, colony,
honey) aggregates. Hives settle lazily from elapsed time with ColonyPolicy v1,
shared as rule vectors; harvesting takes the gentleness share and a handler
credits the keeper. Rewards' credited days and vitality arrive through an
anti-corruption layer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The apiary page opens the keeper's apiary on first visit and shows the stores,
a Phaser scene of the starter hive in Andalusia (bees by colony strength,
pace by vitality, a jar filling with honey, tap to harvest), the hive's honey
and colony meters, and the queen's traits. Honey rises on screen between
loads through the client copy of the colony rule, checked against the
Apiary's rule vectors. Phaser loads only with the apiary route and is kept
in ui/src/game by lint. The dev proxy now matches /api/ only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Identity context wraps better-auth inside the API: email and password
accounts, external OpenID Connect providers from configuration, cookie
sessions, ULID user ids, tables in the identity schema planned by better-auth
and applied by our migrate step, telemetry off. A session actor resolver
feeds the existing ActorGuard; AUTH_MODE=dev keeps the header for scripts.
The web app gains sign-in, sign-up and account pages, guarded routes, a
session loaded before the first route, and refuses to sign out while changes
wait in the offline queue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Breeding costs 15 pollen and raises a queen from a mother colony on an open
flight (Andalusia's wild drones) or a controlled one: half of each trait from
each side, seeded mutations, reproducible from the breeding's id. Queens wait
in a reserve and can head the hive; the replaced queen returns to the reserve.
New species are discovered along the way. Each step is its own transaction,
chained by the apiary's own events. The app breeds, installs, waits for the
server to catch up, and tints the bees with their queen's colours.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The hive scene becomes a floating voxel island in Andalusia: grass, dirt and
stone blocks, an olive tree, a lavender crop, and a wooden hive whose workers
beat their wings in their queen's colours. Every texture is painted at start-up
from pixel maps and scaled up without smoothing.

The whole Apiary page wears a new pixel skin from the design system: bevelled
panels, inventory slots, segmented bars, pixel buttons and notes, and the
Pixelify Sans font. A bee codex shows the species found so far. The look takes
after the Minecraft bee mods that inspired the game, with art of our own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The voxel island now fills the page at the largest whole-number scale that
still shows it, under a sky with distant islets. A heads-up display sits over
the scene: the hive and its harvest, the stores, a hotbar of menus, and the
biome. The queen, breeding, reserve and codex open as pixel drawers that slide
in from the left or the right; Escape closes them.

The design system gains hab-game-layout, hab-pixel-drawer and hab-slot-button,
and the pixel panel can go without a heading or with compact padding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewed-on: https://git.selene.acl.sh/Habitea/App/pulls/12
Reviewed-on: https://git.selene.acl.sh/Habitea/App/pulls/11
Reviewed-on: https://git.selene.acl.sh/Habitea/App/pulls/10
Reviewed-on: https://git.selene.acl.sh/Habitea/App/pulls/9
Reviewed-on: https://git.selene.acl.sh/Habitea/App/pulls/8
Reviewed-on: https://git.selene.acl.sh/Habitea/App/pulls/7
alex merged commit ab917f693c into feat/web-rewards 2026-10-31 08:59:35 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Habitea/App!6
No description provided.