Skip to content

feat(web): add durable Habits workspace - #233

Draft
seonghobae wants to merge 11 commits into
feat/web-tasks-workspace-v1from
feat/web-habits-workspace-v1
Draft

feat(web): add durable Habits workspace#233
seonghobae wants to merge 11 commits into
feat/web-tasks-workspace-v1from
feat/web-habits-workspace-v1

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Advances #209 as the next dependency-ordered child after the durable Tasks workspace. This slice exposes the existing authenticated Habit BFF as a first-party /habits workspace without moving workspace authority into the browser.

RED → GREEN

  • RED dbfd88edbfe88eb7df785f55308701963713e5e1: adds the focused Habits workspace state contract while apps/web/app/habits-workspace-state.ts is absent. The contract requires no invented Habit evidence, bounded durable collection acceptance, duplicate/malformed evidence rejection, an explicit active submission before creation evidence can be accepted, duplicate-create rejection, and preservation of accepted evidence across validation/offline/auth/dependency failures.
  • GREEN 6558aadebd4f3aadc394c5967f4f5cff3a4f38bc: adds the minimal reducer and validators. This is bounded state-module evidence only, not repository-wide CI evidence.
  • e0abb54b657601c136d56b8c7b81c387573823b9 adds the /habits route.
  • 8dc3329c3bc4df4f502b84d961ab36c374b547c4 adds strict browser parsing and the durable create/list client. Browser POST bodies contain only title/timezone/start-date/recurrence; workspace authority stays server-derived by the reviewed BFF. A synchronous submission claim prevents repeated submit events from dispatching duplicate POST mutations before React rerenders.
  • 3a62a62746021934d52ba8a6bb1c29418827a18c adds purposeful responsive/loading/empty/error/auth/offline/focus/44px-control styling without gradients, glass effects, decorative cards, or inert interactions.
  • b4691121a99065088afd6a26a913c03289ee295a adds Playwright buyer-path contracts for durable list evidence, explicit creation, synchronous duplicate-submit suppression, weekly recurrence evidence, Unicode title bounds, 401 fail-closed behavior, and 390px overflow/target-size behavior.
  • 7e7bac9ee789131fda967a57d3131e870a2db550 wires the state contract into the web test suite.
  • 9f268d6efa844666711a038755e6c3e1c66e0464 removes a Review navigation link found during review because this stack does not yet provide a /review page; the UI does not advertise a dead interaction.
  • Review then found a recoverability defect: an active create that received duplicate/invalid durable Habit evidence left submitting=true forever even though the client-side submission claim had been released. RED 9b79ab22238e519c2a94768e9b88ee1b47d95096 changes the focused contract to require fail-closed rejection and release of the mutation lock. Executing the exact RED source/test pair on Node 22 produced 5 pass / 1 fail at the expected ready versus unavailable assertion.
  • GREEN 8073991893cd98e87118960ec1f9f410121f5d5c separates unsolicited success from invalid evidence during an active submission. Unsolicited success remains inert; duplicate/invalid active evidence preserves accepted records, transitions to unavailable, releases submitting, and exposes a retryable error. The exact source/test pair then produced 6/6 passing Node tests. The standalone harness lacked repository @types/node, so this is runtime state-contract evidence, not a repository TypeScript/CI claim.

Exact current head: 8073991893cd98e87118960ec1f9f410121f5d5c. Exact live base re-read before this PR-state update: feat/web-tasks-workspace-v1@05692a786ff51796adc210c28574dc0488ddbc9a.

Durable-acceptance and service boundaries

The UI accepts only exact UUIDv4/title/timezone/local-date/recurrence/canonical-UTC evidence returned by /api/habits, rejects duplicate identities and unknown response shape, does not generate optimistic Habit IDs, and requires explicit user submit before durable creation evidence can enter browser state. The existing Habit BFF remains responsible for authenticated Identity-derived workspace authority and the Habit service remains persistence owner.

The copy deliberately avoids a universal habit-formation deadline. Recurrence is represented as the durable rule rather than a medical or psychological claim.

Design authority and delivery gate

Issue #209 already records Figma authority LifeOS Design System — Product Shell v1, File ID 7NUoFkOgZEjOOOCcCqjU1D, with token board 1:2, desktop navigation 1:38, mobile navigation 1:55, desktop Today-shell contract 1:78, and mobile Today-shell contract 1:106. This PR uses the repository-aligned neutral token vocabulary and implements bounded responsive/focus/error/offline behavior, but does not claim direct Figma-node parity or Storybook completion. The connected Figma surface could not be read in this non-interactive execution, so direct node comparison remains an explicit readiness gate rather than being fabricated from issue prose.

No /review or /settings navigation is advertised from this page until those first-party routes actually exist. Full product-shell navigation therefore remains incomplete by design on this child.

Still intentionally incomplete

This PR remains Draft. Because its base is a non-default stacked feature branch, repository pull-request workflows do not currently provide hosted exact-head CI/security/coverage evidence for this head; the committed Playwright suite is not represented as executed hosted evidence. After prerequisites integrate, this stack must be non-force restacked and reacquire exact-head required gates and review.

This slice does not claim Habit occurrence completion/history, Goal/Project linkage, Today commitment, Weekly Review UI, Storybook completion, KO/EN/JA/ZH/VI/ES/DE/FR translation-ledger parity, direct Figma-node parity, p95 release-performance evidence, release readiness, or #209 closure.

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant