feat(web): add durable Habits workspace - #233
Draft
seonghobae wants to merge 11 commits into
Draft
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Open
14 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
/habitsworkspace without moving workspace authority into the browser.RED → GREEN
dbfd88edbfe88eb7df785f55308701963713e5e1: adds the focused Habits workspace state contract whileapps/web/app/habits-workspace-state.tsis 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.6558aadebd4f3aadc394c5967f4f5cff3a4f38bc: adds the minimal reducer and validators. This is bounded state-module evidence only, not repository-wide CI evidence.e0abb54b657601c136d56b8c7b81c387573823b9adds the/habitsroute.8dc3329c3bc4df4f502b84d961ab36c374b547c4adds 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.3a62a62746021934d52ba8a6bb1c29418827a18cadds purposeful responsive/loading/empty/error/auth/offline/focus/44px-control styling without gradients, glass effects, decorative cards, or inert interactions.b4691121a99065088afd6a26a913c03289ee295aadds 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.7e7bac9ee789131fda967a57d3131e870a2db550wires the state contract into the web test suite.9f268d6efa844666711a038755e6c3e1c66e0464removes a Review navigation link found during review because this stack does not yet provide a/reviewpage; the UI does not advertise a dead interaction.submitting=trueforever even though the client-side submission claim had been released. RED9b79ab22238e519c2a94768e9b88ee1b47d95096changes 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 expectedreadyversusunavailableassertion.8073991893cd98e87118960ec1f9f410121f5d5cseparates unsolicited success from invalid evidence during an active submission. Unsolicited success remains inert; duplicate/invalid active evidence preserves accepted records, transitions tounavailable, releasessubmitting, 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 ID7NUoFkOgZEjOOOCcCqjU1D, with token board1:2, desktop navigation1:38, mobile navigation1:55, desktop Today-shell contract1:78, and mobile Today-shell contract1: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
/reviewor/settingsnavigation 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.