Skip to content

fix(platform): name a failed folder-list read on the Documents hub - #4375

Merged
yannickmonney merged 2 commits into
mainfrom
fix/documents-folder-list-read-failure
Oct 5, 2026
Merged

yannickmonney merged 2 commits into
mainfrom
fix/documents-folder-list-read-failure

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

What changed

The root Documents hub showed No documents yet when the folder-list read (folders/queries:listFolders) failed. At the root, the documents read returns only unfiled documents, so a library whose documents all sit in folders can only reach them through the folder list. DocumentsTable read only the folder data and treated undefined as no folders. It showed no alert, no Retry, and the approximate count disagreed with the empty copy (#3880).

  • documents-table.tsx now reads the folder list through readStateOf. Its unavailable flag stays set while the retry runs, even though react-query resets the read to pending. While the list has never answered:
    • The CatalogLoadError notice above the table names the failure (documents.foldersLoadFailed, EN/DE/FR) and offers Try again. The button shows as busy while the retry runs, keeps its node and reads only the folders again. Focus moves to the Documents region, as the existing documents retry does.
    • Documents already listed stay on screen, and the footer never counts them as all. The host passes loadFailed only once every document page is in, so document paging is never held back.
    • If both reads fail, the table's existing error state shows, and its Try again now retries both.
    • A library that really is empty keeps No documents yet, with no notice.
  • @tale/ui DataTable: a list that a failed read stopped (infiniteScroll.loadFailed) with no rows loaded no longer shows the empty state. A search over it keeps its No results among the loaded items heading at the host's level (h2 here). This is the only shared-component change. Today only the documents table passes loadFailed, and only with rows, so no existing screen changes. useListPage's loadFailed doc says this too.
  • Register: tests/manual/reference/automation.md has a new paragraph after "Task agent latest-run read failures…".

The two commits are fix(ui) and then fix(platform); each is green on its own.

How I verified it

Tests were run with one worker (/opt/node/bin/node …/vitest.mjs run … --maxWorkers=1):

  • documents-table.read-failure.test.tsx (--project client) passes 20/20. It adds 9 tests that use the real hooks, adapters and four-attempt retry policy against the synthetic transport:
    • the failure, with an approximate count of 1 and an empty root;
    • a retry still running, with the request held: Try again is aria-busy, it is the same alert node, the empty state never shows and focus is on the region;
    • a retry that fails, then recovery: the folder row appears, the count is exact and only the folders are read again;
    • a background re-failure with focus on Try again, then recovery that hands focus to the region;
    • documents listed beside failed folders, counted as showingLoadedFailed and never showingAll;
    • both reads failing, where the table error state's retry reads the folders again;
    • EN/DE/FR, where DE and FR must differ from EN;
    • the empty-library control.
  • Red against main's documents-table.tsx: 8 fail and 12 pass. Only the empty-library control and the existing tests pass.
  • Red with only the DataTable change reverted: 6 fail, which are the "never the empty state" tests. Each half of the fix is needed.
  • documents-table.test.tsx (mocked) passes 9/9.
  • @tale/ui data-table.test.tsx and use-list-page.test.ts (--project unit) pass 92/92. The new DataTable test fails against main's data-table.tsx.
  • lib/i18n/messages.test.ts (parity and usage) passes 24/24.
  • Type-aware oxlint and oxfmt --check report nothing on the changed files. lint:manual and lint:conflicts are ok.
  • Types: a scoped tsc over the changed platform files (which reach DataTable and useListPage through their imports) exits 0. A scoped tsc over the @tale/ui files reports nothing in the changed files. Its only errors are CSS side-effect imports in unrelated files, which come from scoping the program.

Not run here: the full suites, the whole-workspace tsc and a real-browser pass. CI runs them.

Not changed

Closes #3880

A host's `loadFailed` already kept "Showing all" off rows a failed read
left short. With no rows at all, the table still drew its empty state,
so a documents level whose folders never answered read "No documents
yet". A stopped list with nothing loaded now renders no empty state; a
search over it keeps its "No results among the loaded items" heading
at the host's level.
At the hub root the documents read lists only unfiled documents, so a
library whose documents sit in folders reaches them through the folder
list alone. A folder read that never answered mapped to no rows and the
hub read "No documents yet", with no failure named and no retry, while
the approximate count said otherwise.

The table now reads the folder list through `readStateOf`: while it
never answered, a notice names it above the table (EN/DE/FR
`documents.foldersLoadFailed`) with Try again, which stays busy through
the retry and reads only the folders again. Listed documents stay, and
are never counted as all; the empty state stays away. With both reads
failed, the table's error state retries both. A library that is empty
keeps its empty state.

Closes #3880
@yannickmonney

Copy link
Copy Markdown
Contributor Author

ACCEPT — independent exact-head review for TALE-878 / TALE-307 / TALE-359.

Reviewed head: 545f2c1b1e5905a0edb515733ec8312b5a52f1ca (PR #4375, issue #3880). Reviewer: Codex #8, independent of implementer Claude #6. This verdict applies only to this SHA.

No blocking findings. A folder-list read that never answered produces the localized accessible alert and Try again; an empty root-document response does not imply nested content is absent. The failure suppresses the ordinary empty state and the claim that loaded rows are all documents, despite an approximate organization count. Successful empty reads retain the empty state. Retry remains announced/busy and inert in flight, preserves loaded rows, retries the appropriate reads, and recovers with focus handed to the Documents region. Both-read failure/recovery and EN/DE/FR are covered.

Verification using existing dependencies and /opt/node/bin/node, one test worker:

  • DocumentsTable read-failure suite: 20/20 passed.
  • DataTable and useListPage suites: 92/92 passed.
  • CatalogView / CatalogLoadError suite: 12/12 passed.
  • Scoped oxlint with type-aware rules and experimental compiler type checking on all five changed TS/TSX files: passed, zero diagnostics.
  • Scoped oxfmt: passed on all five changed TS/TSX files; YAML and Markdown are excluded by the repository formatting contract.

CI settled at this head: 57 SUCCESS, 21 SKIPPED, 1 NEUTRAL; no failures or pending checks to attribute. This records observed conclusions, not a claim that cached CI tasks executed freshly.

The automation.md entry follows the complete “Task agent latest-run read failures…” paragraph in its reserved gap. Examined all 60 currently open PR diffs: other automation.md edits use different insertion points (including #4371 before that paragraph and #4374 after the following text-only paragraph), with no competing insertion into this gap.

Limits: real-browser speech/layout were not exercised; the automation entry explicitly retains these as manual coverage. Initial local test invocation needed an isolated Vite filesystem allowlist for the existing shared dependency directory; after that harness-only adjustment, the unchanged exact-head suites passed. No dependencies were installed, source changed, push, merge, CI rerun, or status change performed.

Task-card posting fallback: workspace_status returned unavailable / not_granted, preventing access to the task tool argument contracts. This PR comment therefore carries the same exact-head verdict for TALE-307 and TALE-359 (3729d02a-eb44-42b2-a68e-1bec2cebbcd6) as authorized by the reviewer brief.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

TALE-890 report for TALE-307; fallback for TALE-359 and TALE-360.

TALE-890 delegated merge report

No PRs merged; no squash SHAs produced.

All three PRs were OPEN at their required exact heads, MERGEABLE and CLEAN against origin/main c842179. Every check was terminal, with zero failing/pending checks and all seven CI ready contexts SUCCESS. Downloaded unit/UI shard logs show zero cached platform shard tasks (workspace unit jobs contain cached tasks).

#4342 composed cleanly: git merge-tree --write-tree origin/main b869ac8 produced ca5ad81209773ad8808f041ddbd569dcb3b6e210. Its focused personalization test was invoked once on the isolated composed tree using /opt/node/bin/node and --maxWorkers=1. It exited 1 during module loading: Vite denied the @fontsource/inter inter-latin-400-normal.woff2?url asset reached through the shared node_modules symlink. Zero tests executed; this is an environment/setup failure, not evidence of a product regression.

Stopped as required by the task on any composed-test failure. Catalog duplicate validation, later PR composition/tests, merges and linked-issue closure verification were not completed. #4374 and #4375 remain unmerged by this run. No approvals, status changes, CI reruns, cancellations or other PR actions.

Reporting fallback: workspace_status returned unavailable/not_granted, so direct comments on TALE-359 (3729d02a-eb44-42b2-a68e-1bec2cebbcd6), TALE-360 (c42a085c-35c6-459f-8006-bdae1a0dc5e1), and source tasks TALE-304, TALE-281 and TALE-307 could not be posted. This report is posted on all three PRs as the authorized fallback.

Artifacts: PR snapshots, downloaded shard logs, merge-tree output, focused-test log and this report are in the TALE-890 delivery box.

@yannickmonney
yannickmonney merged commit 11d2b16 into main Oct 5, 2026
@yannickmonney
yannickmonney deleted the fix/documents-folder-list-read-failure branch October 5, 2026 18:47
@yannickmonney

Copy link
Copy Markdown
Contributor Author

TALE-894 report for TALE-307; authorized fallback for TALE-359 and TALE-360.

TALE-894 completed: all three accepted exact heads were squash-merged in the requested order.

PR Verified squash Linked issue
#4342 41f86cc61cf553e917d61b40c376a19c1e0add6a #3876 CLOSED
#4374 841db4ef5bd6ffe26fe562d92e57e97253020beb #3849 CLOSED
#4375 11d2b1697e6e19d3e1921dff7cf6f1b6e03bf7aa #3880 CLOSED

Before each merge, re-read the PR and confirmed OPEN, exact requested head, CLEAN, all checks terminal with zero failures/pending, and all seven CI ready contexts SUCCESS. GitHub briefly returned UNKNOWN while recalculating after main advanced; subsequent reads returned CLEAN before work continued. Reused TALE-890 shard logs after confirming the six platform unit/UI shard job identities were unchanged; all six platform shard tasks executed uncached. Workspace-unit jobs contain cached tasks, as already recorded by TALE-890. Terminal SKIPPED and the existing NEUTRAL Trivy advisory are retained.

Each git merge-tree --write-tree composition was clean. All 30 EN/DE/FR YAML catalogs, including shared-package and service catalogs, parsed with uniqueKeys enabled and no duplicate-key errors on each composed tree.

Composed-tree targeted tests used /opt/node/bin/node and --maxWorkers=1:

The review-only configs extend the unchanged product Vitest configs and add the existing shared dependency directory to server.fs.allow. No product config was changed or dependency installed. Isolated dependency links resolve Tale workspace packages to the composed source, including #4375 shared UI changes. An initial #4342 invocation had a review-config import-path error before collection; corrected that harness path. A broader initial governance invocation was stopped before completion and narrowed to the relevant policy suite; only the completed focused runs are counted as validation.

Verified each squash has one parent, its tree exactly matches the tested composition, its message has behavior/validation and issue closure with no attribution trailers, and its linked issue is CLOSED. No approvals, task status changes, CI reruns, or other PR actions.

Reporting fallback: workspace_status returned unavailable/not_granted. Direct task comments on TALE-359 (3729d02a-eb44-42b2-a68e-1bec2cebbcd6), TALE-360 (c42a085c-35c6-459f-8006-bdae1a0dc5e1), TALE-304, TALE-281 and TALE-307 were unavailable. This report is posted to each PR as the authorized fallback. Nothing remains open for this merge slice.

Produced in the TALE-894 delivery box: PR and gate snapshots, reused shard logs and CI evidence, composition/catalog/test logs, review configs, squash bodies and verification, issue closure snapshots, and this report.

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(platform): Documents hub turns a failed folder-list read into “No documents yet”

1 participant