Habit management: every goal and schedule, rename, archive, vacations #7

Merged
alex merged 17 commits from feat/habit-management into feat/design-system 2026-10-31 08:59:29 +01:00
Owner

Stacked on #6.

Backend (Habits):

  • RenameHabit and ArchiveHabit. Archiving stops tracking from the user's today, in the tracker's zone:
    • entries and renames are refused;
    • days before it (yesterday during the grace period) are still judged; that day and later never are;
    • the list leaves the habit out, and its history is kept.
  • Migration adds archived_on.
  • Entry handlers read the week start from the tracker instead of assuming Monday (the old WEEK_START constant).

Web app (state, works offline): log progress, record a slip, rename, archive, plan and cancel vacations. The domain refuses what the server would, with the same error codes. Cancelling a vacation already under way cuts it short at yesterday, as on the server.

Web app (screens):

  • New habit (Signal Forms): check, amount and avoid goals on daily, weekday or weekly schedules. It won't offer combinations the server refuses (weekly avoid; check more than once a day).
  • Today rows adapt to the goal: Done, +1 with a "5 / 8 glasses" badge, or Kept today / I slipped. Each has an undo, and tapping a row opens the habit.
  • Habit page: this period, log an exact amount, rename, archive with a confirm step.
  • Settings: time zone, week start, vacations (plan, cancel, end today).
  • ICU plurals through @jsverse/transloco-messageformat 8.4.0 ("2 days in a row", "1 week in a row").

Design system: number, date, segment and chip fields that work as Signal Forms controls; a chip select; a section; a back button and actions slot in the page layout. Ionic's normalize.css and typography.css now load in the base layer, so Tailwind utilities apply to plain buttons and headings (documented in TOOLING 7.2 and pitfalls).

Checked in the browser as the dev user:

  • form validation and its conditional fields;
  • created "Water" (8 glasses on chosen days); +1, then logged 7 to reach 8 / 8; renamed it;
  • planned a 7-day vacation and ended it today;
  • archived "Meditate";
  • an avoid habit: Kept today, I slipped, undo.

The earnings prediction followed each step (+14 / +17 nectar, perfect-day pollen on and off), and the database matched.

Known: messageformat pushes the initial bundle to 950 kB, over the 800 kB budget (a warning, not a failure), and it is CommonJS.

🤖 Generated with Claude Code

Stacked on #6. **Backend (Habits):** - `RenameHabit` and `ArchiveHabit`. Archiving stops tracking from the user's today, in the tracker's zone: - entries and renames are refused; - days before it (yesterday during the grace period) are still judged; that day and later never are; - the list leaves the habit out, and its history is kept. - Migration adds `archived_on`. - Entry handlers read the week start from the tracker instead of assuming Monday (the old `WEEK_START` constant). **Web app (state, works offline):** log progress, record a slip, rename, archive, plan and cancel vacations. The domain refuses what the server would, with the same error codes. Cancelling a vacation already under way cuts it short at yesterday, as on the server. **Web app (screens):** - **New habit** (Signal Forms): check, amount and avoid goals on daily, weekday or weekly schedules. It won't offer combinations the server refuses (weekly avoid; check more than once a day). - **Today rows** adapt to the goal: Done, +1 with a "5 / 8 glasses" badge, or Kept today / I slipped. Each has an undo, and tapping a row opens the habit. - **Habit page:** this period, log an exact amount, rename, archive with a confirm step. - **Settings:** time zone, week start, vacations (plan, cancel, end today). - **ICU plurals** through `@jsverse/transloco-messageformat` 8.4.0 ("2 days in a row", "1 week in a row"). **Design system:** number, date, segment and chip fields that work as Signal Forms controls; a chip select; a section; a back button and actions slot in the page layout. Ionic's `normalize.css` and `typography.css` now load in the `base` layer, so Tailwind utilities apply to plain buttons and headings (documented in TOOLING 7.2 and pitfalls). **Checked in the browser** as the dev user: - form validation and its conditional fields; - created "Water" (8 glasses on chosen days); +1, then logged 7 to reach 8 / 8; renamed it; - planned a 7-day vacation and ended it today; - archived "Meditate"; - an avoid habit: Kept today, I slipped, undo. The earnings prediction followed each step (+14 / +17 nectar, perfect-day pollen on and off), and the database matched. **Known:** messageformat pushes the initial bundle to 950 kB, over the 800 kB budget (a warning, not a failure), and it is CommonJS. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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>
alex added 14 commits 2026-10-31 08:59:23 +01:00
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
alex merged commit 32b5342766 into feat/design-system 2026-10-31 08:59:29 +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!7
No description provided.