Repository navigation
fix(platform): search with the board filters and recover failed reads - #3906
Conversation
…earch The Tasks page intersected its board read with the palette's search, whose first 25 hits ignore the board's facets. With more than 25 matches, a task the facets kept could fall outside those hits and every lane read "No tasks" (#3745). The search is now a board filter. The board doors take `q`, and the shared board filter clause matches it with the palette's token-AND semantics: the task's fields, or one comment on it, hold every token, LIKE metacharacters escaped. It runs in the statement that carries the board's LIMIT, so the facets and the cap apply to the complete match set. The palette keeps its 25-hit page, built from the same tokenizer and the same two legs. The page sends its query with the board read under the existing board key and no longer calls the palette search. A new integration lane proves it on Postgres: 35 matches across six statuses and three assignees, with the only Urgent one as the oldest. The palette still answers its 25 without that task, and the board answers all 35. The lane also checks the facets, archived tasks, token-AND, escaping, KEY-number, a no-match query and the all-projects board. Refs #3745
The Tasks page dropped every read's error state (#3747). A failed first read settled on six "No tasks" lanes, and Filter and Create task vanished because the board's permission defaulted to false. A failed search left every row under the query. Failed dependency and activity reads silently removed the Blocked, agent and review markers, and with them part of "Needs my review". Nothing offered a retry. Each board read now reports where it stands (loading, answered, stale, failed) and has a retry that re-issues it alone: - A failed first read shows an alert with Try again in place of the lanes. The search, filters and controls stay, and permissions fall back to the project's own read. - A failed refresh keeps the rows under a note that they are stale. - A failed search never shows the unsearched rows. - Failed dependencies or activity show a warning over a standing board; the activity one names the review filter when it is on. - A board past its 2,000-task cap says so and points to the search. - While a new search or filter loads, the board keeps its previous rows, dimmed and busy, but never another project's rows. A late answer for an earlier search never replaces the current one. - Try again stays one focusable, busy element while it runs. When it works, the focus moves to the board region, announced as Board or List. Filter uses the shared isFilterAffordanceDisabled rule, so a failed or pending read no longer disables it. The strings ship in EN, DE and FR, with a de-CH quote override. Refs #3747
The tasks guide (EN, DE, FR) now says that the search and the filters narrow the board together and every match appears, comment matches included. It notes the 2,000-task cap and that a search reaches past it. It describes what a failed read, a failed refresh and failed dependencies or activity show, and that Try again reloads only what failed. The tasks suite gains TASK-F51, TASK-B28 to TASK-B31 and TASK-A13, after the IDs #3810 and #3811 took, and TASK-F18 no longer judges two reads agreeing. The automation register names the specs that own the automated half, pins.md records why the boxes say what they say, and the suite totals are recounted. Refs #3745 Refs #3747
…ed-search-recovery The manual readme counts main's boxes plus this branch's six (989). Three of this branch's new boxes collided with IDs other open PRs add — TASK-F51 (#3813), TASK-B28 (#3881), TASK-B29 (#3908) — so they move to TASK-F52, TASK-B32 and TASK-B33, in the suite, pins.md and the automation register.
Every open PR that edits the readme's shared total conflicts with each other one that lands first; the suites keep their own Cost headers, and the readme is recounted once after the queue lands.
…chived-project-and-parent-moves The task suite keeps main's new boxes (#3906) and this branch's TASK-B29 after them; its Cost is 99.
|
Post-merge verification: the rest of the plan, run on this PR's CI-built bundle with synthetic local data only.
Noted for next time: bump only the suite's Cost header and leave the readme totals to the final recount, and run oxfmt on files I resolve during a rebase. |
Summary
Two task board defects, both reproduced on
main(fac88df) in a real browser before the fix. Screenshots and logs are in the task's evidence./tasks/searchanswered 25 other tasks.Closes #3745
Closes #3747
What changed
The search is a board filter (
backend/domains/tasks/service.ts,routes.ts)/tasks/by-project/:id,/tasks) takeq. The sharedboardFilterClausematches it with the palette's own token-AND semantics: the task's fields (title, description, external id,KEY-number), or one comment on it, hold every token, with LIKE metacharacters escaped.LIMIT, so the facets and the 2,000-task cap apply to the complete match set.taskSearchPatterns) and the same two SQL legs, so the two cannot drift. The board statements aliasapp.tasksast.taskBoardScope+ filters). It no longer calls/tasks/search, and hints invalidate it as before.Each board read reports where it stands (
app/features/tasks/lib/read-state.ts,hooks/queries.ts,tasks-workspace.tsx,task-read-alert.tsx)common.actions.tryAgain) replaces the lanes. Search, filters, Filter and Create task stay; permissions fall back to the project's own read while the board read has no answer.placeholderData, matched on the board's key scope, so it never shows another project's rows), dimmed after 300 ms andaria-busy. A late answer for an earlier search never replaces the current one.aria-busy, while it runs. A disabled button would drop the focus, and one given adisabledReasonis re-created inside a tooltip. When the retry works, the focus moves to the board region, announced as Board or List.isFilterAffordanceDisabled, so a failed or pending read no longer disables Filter.useBackendQuerygains a typedplaceholderDatapassthrough, used only by this board.Copy, docs, manual
tasks.read.*strings in EN, DE and FR, plus a de-CH override for its quotation marks.TASK-F51,TASK-B28toTASK-B31andTASK-A13(after the IDs feat(platform): let members create tasks and work their own #3810 and feat(platform): let agents generate images under an opt-in policy #3811 took), andTASK-F18is reworded. It also gets an automation-register row, two pins and the recounted totals.Coordination
canCreate, and itstasks-workspace.test.tsxmock now answers the newread/retryfields.Checklist
bun run checkpasses. Not run whole locally: the sandbox has 4 GiB shared with a parallel session and hit OOM kills. CI runs every job on this PR, and the scoped local runs are listed below.bun run lint:sastpasses (Opengrep): 162 rules on the 17 changed TypeScript files, 0 findings.services/platform/messages/{en,de,fr}.yml(tasks.read.*), plus ade-CHoverride for «…» quotes.docs/{en,de,fr}/platform/projects/tasks.md.README.md/README.de.md/README.fr.md: N/A, they do not describe the board.Test plan
Automated, all run locally on the final head (rebased on 5b10a3c):
tasks-workspace.read-state.test.tsx(12 cases): the real workspace, hooks, adapters andQueryClientagainst a stubbed backend that filters like the server. It covers the Bug: task search applies its 25-hit limit before board filters and hides matching work #3745 fixture, 26 matches with consistent lane counts, a no-match control, failed first reads on board and list with focus hand-off, a stale refresh, a failed search, a scope change while a retry is pending, dependency and activity failures with scoped retries, a true empty board and the cap note. 11 of 12 fail against main's client code; the one that passes is the true-empty control.service.board-search.test.tspins the search inside the statement that carriesLIMITand the shared legs with the palette.routes.board-search.test.tscoversqon both doors.app/lib/backend/tasks.test.tscoversqin the URL and key, trimmed.read-state.test.tscovers the state machine. The existingtasks-workspace.test.tsx,kanban-board,tasks-list,queries,use-home-dataandlib/i18n/messagestests pass.backend:integration, new lanecheckTaskBoardSearch, withcheckTasksandcheckTasksOrgIsolation): 39/40. There are 35 matches across six statuses and three assignees, the only Urgent one is the oldest, and the palette still answers its 25 without it. The lane also checks the assignee, archived and status filters, token-AND,%escaping,KEY-number, a no-match query and the all-projects board. With the route change reverted, all three new records fail. The one FAIL is the environmental BM25 check (pgserver has nopg_search), same onmain.bun run lint:manual,check-guide.tson the tasks suite, and the docs locale/structure/link tests.Real browser (Chromium via Playwright, local stack with a synthetic org only, no provider or agent calls):
/tasks/searchrequest is made.Reviewer spot checks: block
*/api/app/tasks/by-project/*in DevTools, open the board, unblock, press Enter on Try again. Then search a project where the facet match is past the first 25 hits.