Skip to content

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

Merged
mikegreiling merged 1 commit into
mainfrom
mg/project-children-dissolve
Aug 3, 2026
Merged

feat(read): project-view children dissolve to flat items[] (read-shape doctrine PR 2)#376
mikegreiling merged 1 commit into
mainfrom
mg/project-children-dissolve

Conversation

@mikegreiling

Copy link
Copy Markdown
Owner

Second of five sequential PRs implementing the read-shape doctrine (docs/design/read-shape-doctrine.md §3.12). Branched from PR 1 (#375).

What changed (breaking, ALPHA)

The project show / get_project view's live child buckets dissolve into one flat items[] — a heading's membership is a per-row attribute, not a bucket.

  • data.view.items — every LIVE child (unheaded and headed) in project index order. Each row keeps stage (the list is stage-mixed) and when; each headed row carries its heading ref (flat title + project-scoped headingUuid when the title would not round-trip, kept even in compact). Unheaded rows omit heading. Reconstruct a heading's members by filtering items on heading.
  • The unheaded anytime/upcoming/someday buckets and the per-heading stage sub-buckets are gone from the wire.
  • headings[] is now the memberless live-heading catalog [{heading:{uuid,title,archived?}}] (incl. empty + archived-unswept headings). PR 3 unwraps it, merges swept archived headings, and dissolves logbookHeadings.
  • Unchanged this PR: flat logbook, logbookHeadings, the advisories, and the card node.

TTY byte-stability

project show output is byte-for-byte identical — verified by a before/after capture on a maximally-rich fixture (loose + headed children across every stage, closed-unswept, logged, archived-unswept + swept headings, stranded open child) across all flag combos, plus the full render suite. The library retains its structured render grouping (it owns the clock + todayIndex) to project the GUI-faithful layout; only the wire flattened.

Verification

npm run check green (typecheck + oxlint + fmt:check + 2311 tests). New tests: unit shape (flat items[] + memberless catalog + heading refs), CLI e2e wire-shape regression, per-row stage property, MCP get_project.

🤖 Generated with Claude Code

…e doctrine PR 2)

Dissolve the project-view's unheaded anytime/upcoming/someday buckets AND the
per-heading stage sub-buckets into ONE flat `items[]` in project index order
(read-shape doctrine §3.12). Second of five PRs.

- data.view.items: all LIVE children (unheaded + headed), index order, each row
  carrying stage (kept — stage-mixed) + when, and each HEADED row carrying its
  heading ref (flat title + project-scoped headingUuid, kept in compact). A
  heading's membership is now a per-row attribute, reconstructed by filtering
  items on heading.
- headings[]: the memberless live-heading catalog [{heading:{uuid,title,archived?}}]
  (incl. empty + archived-unswept headings). PR 3 unwraps it, merges swept
  archived headings, and dissolves logbookHeadings.
- logbook / logbookHeadings / advisories / card node: unchanged this PR.
- TTY byte-stable: verified byte-identical on a rich fixture (before/after
  capture) + the full render suite. The library keeps its structured render
  grouping (owns the clock + todayIndex) to project the GUI layout; only the
  wire flattened.

src/read/project-view.ts (adds items[]), src/read/shape.ts (shapeProjectView).
Tests: shape.test.ts, e2e.test.ts, stage.test.ts, mcp/server.test.ts. 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 57321bc into main Aug 3, 2026
1 check passed
@mikegreiling
mikegreiling deleted the mg/project-children-dissolve branch August 3, 2026 18:38
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