Skip to content

Hydrate pseudo columns on card output - #207

Open
tahadx wants to merge 1 commit into
basecamp:masterfrom
tahadx:fix/202-pseudo-column-output
Open

Hydrate pseudo columns on card output#207
tahadx wants to merge 1 commit into
basecamp:masterfrom
tahadx:fix/202-pseudo-column-output

Conversation

@tahadx

@tahadx tahadx commented Aug 23, 2026

Copy link
Copy Markdown

Fixes #202

Problem

Cards sitting in Fizzy's built-in lanes — Maybe, Not Now, Done — have no real column, so the API returns an empty column object ({"id":"","name":""}). The CLI passed that through verbatim, leaving --json consumers without a usable column id or name:

"column": { "created_at": "", "id": "", "name": "" }

Upstream behavior confirmed in basecamp/fizzy#2596 and basecamp/fizzy#3017; the API is unlikely to change soon, so this hydrates client-side.

Fix

When a card payload arrives with an empty column.id, infer its lane from fields the API already provides and emit the same pseudo-column shape that fizzy column list prints:

  • closed == true → Done (done, kind closed)
  • postponed == true → Not Now (not-now, kind not_now)
  • otherwise published → Maybe (maybe, kind triage)
  • drafts belong to no lane upstream and are left untouched
"column": { "id": "maybe", "name": "Maybe?", "kind": "triage", "pseudo": true }

The inference is safe because the states are mutually exclusive upstream: closing a card destroys its not_now record, and postponing clears its column. Hydrated ids round-trip back into the CLI (fizzy card column <n> --column maybe).

Applied to: card show, card list, search, and board stream/closed/postponed.

Testing

  • New unit tests in internal/commands/pseudocolumns_test.go: per-lane inference, closed-over-postponed precedence, draft/real-column/unknown-payload no-ops, list handling, plus command-level tests for card show and card list.
  • make fmt-check vet tidy-check and make race-test (includes TestSurfaceSnapshot) pass; no CLI surface change.

Summary by cubic

Hydrates pseudo columns on card output so JSON always includes a usable column id/name. Previously, cards in built-in lanes (Maybe, Not Now, Done) returned an empty column; now the CLI infers the lane and emits the same pseudo-column shape as column list.

  • Inference: closed → Done (done, kind closed); postponed → Not Now (not-now, kind not_now); published → Maybe (maybe, kind triage). Drafts and cards with a real column are unchanged.
  • Applied to: card show, card list, search, board stream, board closed, board postponed.
  • Output shape example: {"id":"maybe","name":"Maybe?","kind":"triage","pseudo":true}; supports round-trip via fizzy card column <n> --column maybe.
  • Safety: upstream states are mutually exclusive; closed takes precedence over postponed.
  • Migration: none. JSON consumers can rely on column.id for built-in lanes.

Written for commit 4911fde. Summary will update on new commits.

Review in cubic

Cards in the built-in Maybe, Not Now, and Done lanes come back from the
API with an empty column object, leaving JSON consumers without a usable
column id or name (fixes basecamp#202).

Infer the lane from the card payload when column.id is empty — closed
maps to Done, postponed to Not Now, published to Maybe — and emit the
same {id, name, kind, pseudo} shape that column list already prints.
Drafts have no lane upstream and are left untouched, as are cards with
a real column.

Applied to card show/list, search, and board stream/closed/postponed.
Copilot AI balanced review requested due to automatic review settings August 23, 2026 16:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Hydrates missing card column metadata for Fizzy’s built-in lanes, resolving #202 for JSON consumers.

Changes:

  • Infers Maybe, Not Now, and Done pseudo-columns.
  • Applies hydration across card, search, and board outputs.
  • Adds unit and command-level coverage.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
internal/commands/pseudocolumns.go Implements pseudo-column inference and hydration.
internal/commands/pseudocolumns_test.go Tests inference, exclusions, lists, and card commands.
internal/commands/card.go Hydrates card list and show output.
internal/commands/board.go Hydrates closed, postponed, and stream output.
internal/commands/search.go Hydrates search results.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

Was it a design decision to not give default columns id's?

2 participants