Skip to content

Board search, collapsed filters, paged contributions, task details — and tasks as trees - #107

Merged
Barneyjm merged 2 commits into
mainfrom
claude/board-search-and-paging
Aug 1, 2026
Merged

Board search, collapsed filters, paged contributions, task details — and tasks as trees#107
Barneyjm merged 2 commits into
mainfrom
claude/board-search-and-paging

Conversation

@Barneyjm

@Barneyjm Barneyjm commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Five changes to the public surfaces, from a phone screenshot where 27 tag chips filled the entire viewport before the first conjecture card.

No version bump. This touches only the Worker control plane and the static site, both of which ship on merge via the Deploy workflow. The npm CLI bundle is unchanged — verified by building it on this branch and on main: the only difference is the embedded build SHA, and neither new server symbol appears in the bundle. A bump would republish an identical CLI under a new number.

Search (site/conjectures.html)

The board already loads all 180 conjectures in one /leaderboard payload, so filtering is client-side and instant — no endpoint. Terms are AND-ed across name, slug and tags.

The query is hyphen-split the same way the haystack is. Without that, firstproof-c4 — the likeliest thing anyone pastes — matched nothing. Checked against the live payload: erdos graph → 2, first proof → 2, GRAPH → 11, firstproof-c4 → 1.

Topic filters collapse

27 chips before the first card, on the page whose job is showing conjectures. Now behind one toggle that names the active topic when set — a filtered board that looks unfiltered is worse than a busy one. Picking a topic collapses it again, and the empty state says which constraint emptied the board and offers a reset.

Contribution paging

The feed was capped at LIMIT 10 server-side, which made "Every attempt, logged" false on any conjecture with more — firstproof-c4 has 39. listTargetContributions + GET /conjectures/:slug/contributions page the rest, sharing one row-builder with the embedded head so a paged-in row can't render differently from the ten above it.

Ordered by id DESC, not created_at DESC: ids are monotonic, so an offset walk can't skip or repeat a row when two contributions share a timestamp.

Task details (site/tasks.html)

The title is now a disclosure button — not a clickable <li>, which would have nested the conjecture link inside a control — opening kind, deliverable, verifier, cap, posted date and short id. The full brief stays out by design; the panel says it arrives at checkout.

Tasks as trees

A hard task is split by a volunteer's agent and published only once a peer agent approves, but nothing showed that structure — an impetus task and its five pieces looked like six unrelated jobs.

GET /conjectures/:slug/tree returns the forest as flat nodes with parent_id. The edge is deliberately two hops: tasks.decomposed_from points at the contribution that proposed the split, and that contribution points at the parent task — so lineage carries who split it. Publication requires approval, so every edge that exists is peer-approved.

▾ Simulate slim(Δ) against the δn scale    [open · $8.00]
      ↳ split out by @ada, peer-approved
    Analytical δn lemma                     [open · $3.00]
  ▾ Sweep n = 10^3 … 10^5                   [open · $4.00]
        ↳ split out by @ada, peer-approved
      Chunk n = 10^3 … 10^4                 [open · $2.00]
      Chunk n = 10^4 … 10^5                 [open · $2.00]
    Sweep n = 10^5 … 10^6                   [open · $4.00]
  Full proof attempt, failure points logged [open · $6.00]

Judgement calls worth a look:

  • Peer-review tasks excluded — their decomposed_from is null, so they'd render as extra roots reading as impetus tasks nobody proposed. review_excluded reports the count rather than silently shrinking it.
  • Finished tasks included, not just open ones — a tree of only open tasks is mostly holes, and per-task title/status is less exposed than the contributions feed already is.
  • Sibling order needed a tiebreak — subtasks from one split share created_at exactly (one transaction), so Postgres order was unspecified and the tree reshuffled between loads. Falls back to title; verified stable across repeated fetches. The proposer's intended order isn't recoverable — nothing records it.
  • One caption per split, not per child, and collapse state derives from a set of collapsed ids so re-expanding a parent doesn't blow open subtrees collapsed separately.

Testing

573 tests pass (9 new), lint and typecheck clean. Paging verified end to end against a locally seeded 23-contribution conjecture: 23 rows, unique, strictly descending.

⚠️ Not visually confirmed. No browser extension available and no jsdom/playwright in the project — I wasn't going to add a dependency for it. Server contracts are test-covered, page scripts parse, and I simulated the client's exact tree walk in Node (row order, indent depth, caption grouping). Layout and click behaviour are unverified.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QQgFEPRY4W74D4eqawQ4A6

Barneyjm and others added 2 commits July 31, 2026 20:18
Four fixes to the public surfaces, all from the same complaint: the pages show
either too much at once or too little to be true.

Search (conjectures.html). The board already loads all 180 conjectures in one
/leaderboard payload, so filtering is client-side and instant — no endpoint.
Terms are AND-ed across name, slug and tags, and the query is hyphen-split the
same way the haystack is: without that, "firstproof-c4" — the likeliest thing
anyone pastes — matched nothing at all.

Topic filters collapse. 27 tag chips filled an entire phone screen before the
first conjecture card, on the page whose job is showing conjectures. They now
sit behind one toggle that names the active topic when set, because a filtered
board that looks unfiltered is worse than a busy one. Picking a topic
collapses it again, and the empty state says which constraint emptied the
board and offers a reset.

Contribution paging. The feed was capped at LIMIT 10 server-side, which made
"Every attempt, logged" false on any conjecture with more (firstproof-c4 has
39). listTargetContributions + GET /conjectures/:slug/contributions page the
rest, sharing one row-builder with the embedded head so a paged-in row can
never render differently from the ten above it. Ordered by id DESC, not
created_at DESC: ids are monotonic, so an offset walk cannot skip or repeat a
row when two contributions share a timestamp.

Task details. The title on /tasks is now a disclosure button — not a clickable
<li>, which would have nested the conjecture link inside a control — opening
kind, deliverable, verifier, cap, posted date and short id. The full brief
stays out by design; the panel says it arrives at checkout instead of leaving
that unexplained.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QQgFEPRY4W74D4eqawQ4A6
A hard task is split into subtasks by a volunteer's agent and published only
once a peer agent approves the split — but nothing on the site showed that
structure. The open pool listed tasks flat, so an impetus task and the five
pieces it became looked like six unrelated jobs.

getTargetTaskTree + GET /conjectures/:slug/tree return the forest for one
conjecture as flat nodes with parent_id; the page draws the tree. The edge is
deliberately two hops — tasks.decomposed_from points at the *contribution*
that proposed the split, and that contribution points at the parent task — so
lineage carries who proposed each split, not just what came of it. Publication
requires peer approval, so every edge that exists is by definition approved.

Peer-review tasks are excluded. Their decomposed_from is null, so they would
render as extra roots and read as impetus tasks nobody ever proposed;
review_excluded reports how many were dropped rather than silently shrinking
the count.

Sibling order gets a title tiebreak: subtasks from one split are inserted in a
single transaction and share created_at exactly, so without it Postgres order
is unspecified and the tree reshuffles between page loads. Verified stable
across repeated fetches.

On the page, one caption per split rather than per child ("split out by @x,
peer-approved") — three siblings from one proposal said it three times.
Collapse state is derived from a set of collapsed ids instead of toggling rows:
hiding descendants on collapse and showing them on expand loses the state of
any subtree the reader had collapsed separately.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QQgFEPRY4W74D4eqawQ4A6
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@Barneyjm
Barneyjm merged commit 3eec9bc into main Aug 1, 2026
6 checks passed
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.

1 participant