Virtual cube sink card on the collection Settings tab (Z-8b)

Open
#168 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
58/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
python, react, typescript
Domain
database, frontend

Research direction

Read the referenced Z-8 plan and the spec’s §9, then inspect the collection Settings components and query hooks under app/src/lib/cubes/. Follow query key conventions in app/src/lib/query/keys.ts and the existing association and sink APIs. Done means the card supports the specified form, validation, lock and first-append refusal states, and status for each cubeSinkHealth value; run the component tests and verify.

Written by the indexing model from the issue text.

Description

queue: virtual cube (Z) ready

Queue: Z (#83) · Spec: docs/superpowers/specs/2026-10-03-virtual-cube-sink-design.md §9 · Plan: docs/superpowers/plans/ (the Z-8 plan covers both #94 and this slice; write it first)

Split out of #94 on 2026-11-10 so the Preview work and the sink card can land as two PRs in parallel. Files do not overlap with #94.

Task

Settings tab "Virtual cube" card (operator+): source picker (collections with a reference-mode ingest association only, from GET /api/associations/reference-sources), variables, window, enable/disable (optimistic PATCH), and status (ledger counts, last error, last snapshot, last maintenance including sizes; cubeSinkHealth from #129 decides the badge).

Facts to build on (from #94 and #129)

  • Always send enabled on PUT (the schema defaults it to true).
  • Disable the source picker and layout fields once last_snapshot_id is set (the only lock signal).
  • Refuse writes while last_snapshot_id is null and rows are pending: any app write bumps updated_at and makes the pipeline discard and redo the first append.
  • A 404 from GET is "no sink yet" only when the caller already manages the collection.
  • PATCH is optimistic (expectedVersion); a 409 means reload. 422 unsupported_source_protocol and the other API validation errors render inline.
  • The collection that will hold the cube must exist first; the card creates the sink, not the collection.

Acceptance criteria

  • verify green.
  • Component tests: the form, validation errors from the API, the locked state, the first-append write refusal, the status block for each cubeSinkHealth value.
  • Query keys through app/src/lib/query/keys.ts; hooks next to app/src/lib/cubes/.

Files in scope

app/src/components/collections/ (sink card + Settings tab mount)
app/src/lib/cubes/ (queries)
app/src/lib/query/keys.ts
app/src/__tests__/

Lead-only steps

Browser check against the stack; e2e if a spec is added.

Dominant language
Python
Stars
0
Forks
2
Avg merge
8h 26m
Merged PRs (30d)
47

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TechTraverse/stac-higher

All issues in TechTraverse/stac-higher

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.