Skip to content

feat(example): Package & Issuance browser in web_ui_demo — campus tree + issue-revision + compare drill-ins #394

Description

@thewrz

Why

The demo has zero package/revision client code: no api.js functions for the existing routes, no view renders packages or issuances, no API_FEATURES flag — even though server.mjs already proxies /packages and /revisions, and the MCP chat already lists list_packages / issue_package_revision / get_revision. The campus story (Client → Project → Package → Issuance → CCD, packages as overlapping lenses like Campus Underground vs Building A Core & Shell, per-package non-linear issuance clocks) is invisible in the demo.

What (all inside examples/web_ui_demo/ — example/POC code, no src/ changes)

  1. Packages view tab (pattern-match existing tabs): list the active project's packages with ordered member specs (GET /projects/{id}/packages); create a package; edit membership (PUT /packages/{id}/specs, reusing the board's project-member specs).
  2. Issuance timeline per package (needs feat(api): list a package's revisions — GET /packages/{id}/revisions #388): ordered revision list with type/phase/number/date badges rendered from the nomenclature profile (GET /projects/{id}/revision-nomenclature); "Issue revision" form driven by the profile's type fields (structured create body); nest children under parentRevisionId and show baseRevisionId lineage when present (feat(db/api): issuance nesting — parent_revision_id on package_revisions (CCDs under issuances, ADR required) #389/feat(db/api): persist addendum comparison base — base_revision_id on package_revisions #390 — feature-detect).
  3. Compare drill-ins: select two issuances (or live package vs issuance) → hand off to the Compare view / compare_specs-per-section or compare_scopes when available (feat(reporting): frozen revision trees as comparison sources — polymorphic compare refs + freeze-time origin embedding (ADR required) #392/feat(reporting): scope rollup comparison — project↔project, package↔package, issuance↔issuance over shared sections #393 — feature-detect; degrade to today's live-spec Compare).
  4. Plumbing: api.js functions for the package/revision routes; one API_FEATURES.packages flag gating the tab; README walkthrough — a scripted campus scenario (multi-building project, an underground-only package, a permit issuance, an addendum, a CCD under a bulletin).

OpenAPI ↔ MCP contract lockstep

No API change: consumes existing + this series' contracts read/write from example code only. If implementation reveals a needed contract change, STOP and file it separately with the lockstep blurb — never drift the demo from the spec.

Prior art / cross-links

Non-goals

Acceptance

  • With feat(api): list a package's revisions — GET /packages/{id}/revisions #388 live: the tab lists packages + issuance timelines; issuing a revision from the form appears in the timeline; nesting/base render when the backend supports them; compare drill-in lands in the Compare view with the right sources; demo suites stay green (node --test examples/web_ui_demo/*.test.mjs) with new pure helpers covered; README campus walkthrough reproduces end-to-end.

Hard dependency: #388. Feature-detects #389/#390/#392/#393.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions