Skip to content

feat(board): filter the public board by status, hiding completed by default - #34

Merged
canghai118 merged 2 commits into
linkcraftstudio:mainfrom
quadcom:feat/board-status-filter
Oct 16, 2026
Merged

canghai118 merged 2 commits into
linkcraftstudio:mainfrom
quadcom:feat/board-status-filter

Conversation

@quadcom

@quadcom quadcom commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

The public board shows every card whatever state it is in, so finished work crowds out what is still live. On a board with any history, the first screen is mostly things nobody can act on.

This adds a status control to the board toolbar, beside the Top/Recent switch. It offers Active (the default: open, planned and in progress), All statuses, and each of the four statuses individually.

Behaviour

?s= mirrors the existing ?b=: the default view carries no parameter, so a bare board URL is unchanged and every other selection is a shareable link. An unrecognised value falls back to the default rather than emptying the board.

The default hides only done. Planned and in-progress work still counts as live, so the board keeps showing what has been picked up — which is usually the reason someone came.

Implementation notes

  • GET /api/posts and GET /api/boards take status as one name or a comma-separated list, so "everything still live" is one round trip. A single value keeps the existing eq behaviour, so current callers are unaffected; unknown names are dropped rather than 400'd, since a hand-written link with a typo should still return a board.
  • The board counts in the sidebar take the same filter. Without that, a badge reading 8 above a list of 3 reads as a bug. The store remembers the filter so its own refetches do not silently widen back to unfiltered, and the dashboard pages pass nothing, which clears it.
  • Search is the one place the filter is applied client-side. /api/posts/search returns a fixed nearest-N set, so filtering narrows those matches rather than searching deeper. That seemed the right trade — search there is a duplicate check rather than a way to browse — but happy to push it into the query instead if you would prefer.
  • ACTIVE_STATUSES lives beside ROADMAP_STATUSES in shared/types/post.ts, so one place decides what "active" means.
  • New keys are in both en.json and zh.json; scripts/i18n-check.mjs passes. The four status names reuse the existing status.* namespace.

Checked

Run against a scratch database seeded with all four statuses, on this branch off current main:

  • default view returns the three live cards; ?s=done returns the two finished ones; ?s=all returns five
  • a single status returns only that status; a nonsense value returns 200 and the default view
  • sidebar counts track the filter in both directions
  • server-rendered pages return 200 for each selection, with the control showing the current one

The naming is the part I am least sure of: "Active" is a coined term, and "Open" was taken by one of the four statuses. Glad to rename it to whatever fits the product's voice.

🤖 Generated with Claude Code

https://claude.ai/code/session_01E7qmtvZDwy69A484ArAJ2i

quadcom added a commit to quadcom/feedlog-token that referenced this pull request Sep 17, 2026
The filter now has two branches: the one merged into `main`, which carries the
fork's other work and can never be offered, and a clean replay onto
`upstream/main` that is PR linkcraftstudio#34. Naming which is which stops the wrong one being
pushed at upstream later.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E7qmtvZDwy69A484ArAJ2i
quadcom and others added 2 commits October 16, 2026 03:49
…efault

The board showed every card regardless of where it had got to, so finished
work crowded out what was still live. A status control in the toolbar now
narrows the list, defaulting to everything that is not completed.

`?s=` mirrors the existing `?b=`: the default view carries no parameter, so a
bare board URL is still the default and any other selection is a shareable
link.

The list and boards endpoints take `status` as one name or a comma-separated
list, so "everything still live" is one round trip; a single value keeps the
old `eq` behaviour, leaving existing callers untouched. The board counts take
the same filter, since a badge reading 8 above a list of 3 reads as a bug.

Search is the one place the filter is applied client-side: the endpoint
returns a fixed nearest-N set, so filtering narrows those matches rather than
searching deeper. Search here is a duplicate check, not a way to browse.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E7qmtvZDwy69A484ArAJ2i
Filter semantic and trigram searches before their result limits, preserve status
parameters when switching boards, and keep portal counts separate from shared
unfiltered board metadata. Refresh both views after mutations and discard stale
list, pagination and count responses. Give Active a distinct Chinese label.

Add HTTP integration coverage for search limits, status pagination, merged
feedback and organization boundaries. Verify portal navigation, submissions,
deletions and reordered responses in the browser.

Signed-off-by: canghai118 <3394863+canghai118@users.noreply.github.com>
@canghai118
canghai118 force-pushed the feat/board-status-filter branch from 6acf8b7 to 7509d23 Compare October 16, 2026 06:03
@canghai118
canghai118 merged commit 4cdd68c into linkcraftstudio:main Oct 16, 2026
2 checks passed
@canghai118

Copy link
Copy Markdown
Contributor

Thanks for your contribution and patience, and sorry for the delayed review; I’ve rebased it onto the latest main, added a few follow-up fixes, and merged the PR.

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.

2 participants