Hydrate pseudo columns on card output - #207
Open
tahadx wants to merge 1 commit into
Open
Conversation
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.
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
columnobject ({"id":"","name":""}). The CLI passed that through verbatim, leaving--jsonconsumers without a usable column id or 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 thatfizzy column listprints:closed == true→ Done (done, kindclosed)postponed == true→ Not Now (not-now, kindnot_now)maybe, kindtriage)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, andboard stream/closed/postponed.Testing
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 forcard showandcard list.make fmt-check vet tidy-checkandmake race-test(includesTestSurfaceSnapshot) 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.
done, kindclosed); postponed → Not Now (not-now, kindnot_now); published → Maybe (maybe, kindtriage). Drafts and cards with a real column are unchanged.card show,card list,search,board stream,board closed,board postponed.fizzy card column <n> --column maybe.column.idfor built-in lanes.Written for commit 4911fde. Summary will update on new commits.