Skip to content

fix(platform): show archived work in search, labelled as archived - #3326

Merged
Israeltheminer merged 8 commits into
mainfrom
fix/palette-archived-search
Sep 12, 2026
Merged

Israeltheminer merged 8 commits into
mainfrom
fix/palette-archived-search

Conversation

@Israeltheminer

@Israeltheminer Israeltheminer commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

The ⌘K palette now returns archived tasks and projects, and rows belonging to an archived project, each labelled Archived or Archived project. Live rows still list first.

Why

#2999 decided that archived material stays searchable and that results say they are archived. #3007 shipped the two labels for it, archived and projectArchived, and scoped the UI out: "Not included: any UI change." Nothing tracked the rest, so the palette kept the pre-decision predicate while the agent path implemented the decision. The same query answered differently depending on who asked.

The wider effect was the project set. searchTasks built its readable projects from listProjects, which defaults includeArchived to false, so a live task in an archived project was unfindable. That is the case #3007 named: "A live task in a retired project may still be work nobody closed." searchDocumentsView resolved projects the same way, so those files went too.

What changed

  • SearchResult gains badge, rendered as a chip beside the title. The contract had no field a hit could say this in.
  • searchTasks returns archived tasks, reads archived projects, and stamps both labels in one place so its two legs cannot disagree.
  • searchProjects returns archived projects. PROJECT_COLUMNS already carried archived_at_ms.
  • searchDocumentsView reads archived projects and stamps projectArchived. Trash is untouched: lifecycle_status stays a hard fence.
  • Live rows sort ahead of archived ones, in the SQL page order and again in the merge. Archiving bumps updated_at_ms, so under a recency-only sort an archived row takes the freshest slot on a page capped at 25.
  • Badge copy in en, de and fr.

Archived work also says so where it lives, not only in search:

  • A board card and a list row carry the Archived badge. Colour was the sole cue (opacity-70 at task-card.tsx:121 and tasks-list.tsx:326), which WCAG 2.1 AA 1.4.1 does not allow. TASK-F5 already claimed the rows wore this badge; now they do.
  • An archived project carries the badge beside its breadcrumb name on every tab. It previously announced itself only in the Projects list, so a retired project looked live from inside.

The tasks page is affected by the same defect through a different route. It renders board ∩ search (tasks-workspace.tsx:166), so the board read is a ceiling the search read can only narrow. With Show archived on, the board returned archived tasks and searchTasks did not, so typing in Search tasks silently removed the rows the toggle had just revealed. Widening searchTasks makes the two agree; the toggle still governs.

Risk

A search page is capped at 25 rows and archived rows now compete for it. The two sort keys keep that from costing live results. The lane a capped page keeps live tasks and drops the archived one pins it at exactly the cap.

Chats and contacts are unchanged. searchChats excludes archived threads under its own vocabulary and #2999 never covered it; contact trash is a fence #3007 left alone.

Tests

Real Postgres, 630/631 checks across 147/147 lanes. The one failure is tasks: a burst of serializable commenters, which fails on clean origin/main too and varies run to run (attempts 26 and 28 against a ≤24 bound; once landed=10/12).

Assertion Mutation that turned it red
An archived task is returned and labelled Restore AND t.archived_at_ms IS NULL in the field leg
A live task in an archived project is returned Restore listProjects(sql, auth) without includeArchived
Live rows sort ahead of archived ones Drop the band from the merge sort
A capped page keeps live rows Drop the band from the SQL page order
An archived project is returned by project search —
A row renders its badge Render the badge never
A row without one renders none Render the badge always
Show archived plus a query keeps the task Make the board ignore includeArchived
A board card badges when archived Force the card condition false, then true
A list row badges when archived Force the row condition false, then true
A project breadcrumb badges when archived Force the breadcrumb condition false, then true

The third mutation showed the merge sort masks the SQL order in a two-row fixture, so the fourth assertion builds 25 live rows plus one archived to pin the SQL key on its own.

That lane asserts both reads parsed before reading them. Its first draft required an _id the board does not return, so both parses failed and the want false half passed while proving nothing.

The card's negative case needed a second pass. Forcing the badge to always render did not fail it: the fixture had no project key, so formatTaskIdentifier returned null, the identifier row was skipped, and the badge could not appear either way. Both fixtures now render that row, and the permissive mutation fails.

Manual boxes NAV-F15, TASK-F18 and PROJ-F22 cover what a headless run cannot judge: the chip's weight beside the title, dark mode, and 400px.

Scope

Closes #3325. Does not close #2999, which is already closed.

Gate: bun run check green (43/43) apart from two pre-existing failures reproduced on clean origin/main — @tale/docs deploy-sim.test.ts under concurrency (passes in isolation, 206/206) and two @tale/sandbox-runtime-daemon host-dependent tests, in a workspace this branch does not touch. knip:check green; lint:manual 777 boxes; lint:sast 0 findings in changed files.

🤖 Generated with Claude Code

@Israeltheminer

Copy link
Copy Markdown
Contributor Author

Smoke test is red for a reason outside this branch. Docker Hub no longer serves minio/minio anonymously:

$ curl -s -o /dev/null -w "%{http_code}" -H "Authorization: Bearer $ANON_TOKEN" \
    https://registry-1.docker.io/v2/minio/minio/manifests/RELEASE.2025-04-22T22-12-26Z
401
$ curl -s https://registry-1.docker.io/v2/minio/minio/tags/list -H "Authorization: Bearer $ANON_TOKEN"
{"errors":[{"code":"UNAUTHORIZED","message":"authentication required", ... "Name":"minio/minio","Action":"pull"}]}

In the job that surfaces as pull access denied for minio/minio, then object-store never becomes healthy, then db / knowledge-db / object-store each time out at 300s and the job is cancelled. Two full reruns of the Build workflow reproduce it identically.

The tag is pinned at tools/cli/src/lib/compose/types.ts:191 and tools/cli/src/lib/deployment/runtime-test-helper.ts:63. This branch touches neither, and no compose, image or Dockerfile. main's Build passed at 11:05 today and this started failing at 21:40.

It is not specific to CI: a self-hosted install that pulls the image fresh hits the same 401. Worth its own issue and fix; deliberately not folded in here.

Every other check is green: 44 success, 2 skipped (fork-PR variants), 1 neutral (Trivy).

@Israeltheminer

Copy link
Copy Markdown
Contributor Author

Resolved, and my earlier comment's call to action is stale. #3328 landed on main at 00:31 today and switches every reference to quay.io/minio/minio. This PR's checks run against a merge with main, so Smoke test is green here now: 45 success, 2 skipped (fork-PR variants), 1 neutral (Trivy), 0 failures.

The cause I described holds. Docker Hub still refuses minio/minio anonymously, and it is not a rate limit — a control image returns 200 from the same address with x-ratelimit-remaining: 100;w=3600, while minio/minio returns 401 authentication required. #3328 reached the same conclusion independently. No separate issue is needed.

An archived task on the board or list was signalled by opacity alone, and an
archived project said so only in the Projects list. Both now carry an Archived
badge: the task row, and the project breadcrumb on every one of its tabs.
@Israeltheminer
Israeltheminer merged commit 9f01137 into main Sep 12, 2026
48 checks passed
@Israeltheminer
Israeltheminer deleted the fix/palette-archived-search branch September 12, 2026 10:35
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.

Bug: search hides archived work, contradicting the #2999 decision Decision: should an archived project's documents still answer RAG searches?

1 participant