Skip to content

feat(read): area-view direct to-dos dissolve to flat items[] (read-shape doctrine PR 4) - #378

Merged
mikegreiling merged 1 commit into
mainfrom
mg/area-view-dissolve
Aug 3, 2026
Merged

feat(read): area-view direct to-dos dissolve to flat items[] (read-shape doctrine PR 4)#378
mikegreiling merged 1 commit into
mainfrom
mg/area-view-dissolve

Conversation

@mikegreiling

Copy link
Copy Markdown
Owner

Fourth of five sequential PRs implementing the read-shape doctrine (docs/design/read-shape-doctrine.md §3.13). Branched from PR 3 (#377).

What changed (breaking, ALPHA)

An area has TWO order axes (project sidebar rank, direct-to-do index), so it keeps two flat lists.

  • data.view.items — ONE flat list of every direct to-do in area index order, each row carrying stage (KEPT — stage-mixed) and when, area dropped (the card states it). The anytime/upcoming/someday direct-to-do buckets are gone. Area direct to-dos are never headed nor project-nested → fully self-describing.
  • data.view.projects — UNCHANGED (child-project rows, sidebar order, mixed-stage, someday/scheduled included). The distinct order axis; the projects / someday-projects / direct / upcoming / loose render variants collapse to TTY projections of projects[] + items[].
  • Caps unchanged: project_limit caps project rows, area_limit caps the open/current direct to-dos; the area truncation block reports those hidden, and the flat items[] drops exactly them (the later scheduled/someday rows always ride items[]--show-later is TTY-only, never gated the wire).

TTY + truncation byte-stability

area show output AND the truncation blocks are byte-for-byte identical (verified incl. the area_limit cut on a rich fixture, plus the full render + loose-pseudo-area suites). The library retains its structured direct-to-do grouping for the GUI projection; only the wire flattened. Also removed the now-dead rebucketChildren card-bucketing helper — no wire surface has stage/date sub-buckets anymore.

Verification

npm run check green (typecheck + oxlint + fmt:check + 2313 tests). New/updated tests: unit shape + truncation (capped items[]), CLI e2e wire regression, loose-pseudo-area, MCP get_area.

🤖 Generated with Claude Code

…ape doctrine PR 4)

Dissolve the area-view's direct anytime/upcoming/someday buckets into ONE flat
items[]; keep projects[] (read-shape doctrine §3.13). Fourth of five PRs. An area
has two order axes (project sidebar rank, direct-to-do index), so it keeps two
flat lists.

- data.view.items: every direct to-do in area index order, each carrying stage
  (kept — mixed) + when, area dropped. anytime/upcoming/someday gone.
- data.view.projects: UNCHANGED (child-project rows, sidebar order, mixed stage).
  The projects/someday-projects/direct/upcoming/loose render variants are TTY
  projections of projects[] + items[].
- Per-block caps unchanged: area_limit caps the open/current direct to-dos; the
  "area" block reports those hidden and the flat items[] drops exactly them (later
  scheduled/someday rows always ride items[]; --show-later is TTY-only).
- TTY + truncation byte-stable (verified byte-identical incl. the area_limit cut).
  The library keeps its structured direct-to-do grouping for the GUI projection;
  only the wire flattened. Removed the now-dead rebucketChildren card-bucketing
  helper (no wire surface has stage/date sub-buckets anymore).

src/read/area-view.ts (adds items), src/read/truncation.ts (capAreaSections),
src/read/shape.ts (shapeAreaView), src/mcp/server.ts (get_area/get_project descs).
Tests: unit shape/truncation, cli e2e/loose/render, mcp. Docs: read-shape-doctrine.md,
contract.md, design/contracts.md. No apiVersion/error code change.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RYbJensXxHpJK1v1VDXYUD
@mikegreiling
mikegreiling merged commit 044ffd0 into main Aug 3, 2026
1 check passed
@mikegreiling
mikegreiling deleted the mg/area-view-dissolve branch August 3, 2026 19:34
mikegreiling added a commit that referenced this pull request Aug 5, 2026
… re-audit (#398)

* Revert "docs(read): ordering contract + skill sweep for the read-shape doctrine (PR 5) (#379)"

This reverts commit debbe6f.

* Revert "feat(read): area-view direct to-dos dissolve to flat items[] (read-shape doctrine PR 4) (#378)"

This reverts commit 044ffd0.

* Revert "feat(read): project-view headings catalog + logbook flatten (read-shape doctrine PR 3) (#377)"

This reverts commit 94f1dda.

* Revert "feat(read): project-view children dissolve to flat items[] (read-shape doctrine PR 2) (#376)"

This reverts commit 57321bc.

* Revert "feat(read): today dissolve — flat items[] + meta.counts; badge purge (read-shape doctrine PR 1) (#375)"

This reverts commit ce4fa4d.

* chore(read): post-revert bookkeeping — CHANGELOG, doctrine status, skill floor

Follow-up to the five read-shape doctrine reverts (#375-#379):

- CHANGELOG: add a breaking Unreleased entry documenting the wholesale
  revert and the return to pre-0.13.0 bucketed today/project/area shapes;
  meta.counts removed. Clean revert, no compat shims (ALPHA-CONTRACT).
- docs/design/read-shape-doctrine.md: restored (the PR-1 revert deleted it)
  with its status changed to REVERTED (dated) — retained as the input to a
  design re-audit of the read-shape approach.
- skills/things-cli/SKILL.md: reconcile the npx floor sentence. The skill
  again teaches the bucketed read shapes, which 0.13.0 does NOT have; anchor
  the floor to the skill's publish-stamped version (the release that ships
  these shapes) instead of the now-false "below 0.13.0" literal.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C1g2PkB43exMAfFdg6QnMT

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant