Skip to content

fix(platform): name a failed cloud-import setup check, hold Connect - #4378

Merged
yannickmonney merged 3 commits into
mainfrom
fix/cloud-import-app-status-read-failure
Oct 5, 2026
Merged

yannickmonney merged 3 commits into
mainfrom
fix/cloud-import-app-status-read-failure

Conversation

@yannickmonney

@yannickmonney yannickmonney commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

What changed

The Documents cloud-import connect dialog (CloudImportConnectDialog) read a failed cloud_import/queries:getOauthAppStatus check as an app that is set up. appMissing was data !== undefined && !data.configured, so a 503 left data undefined and the dialog showed the ordinary not-connected words and a live Connect. It named no failure and offered no way to run the check again (#3864).

  • Dialog: the check is read through readStateOf, the same pattern as Bug: failed knowledge-entry reads look like an empty library or missing history #3777 and fix(platform): show a failed passkey list read with a retry #4300. While the check has failed, the shared CatalogLoadError replaces the guidance with a destructive alert and Try again, which re-runs the query. Neither Connect nor the admin's Open connector settings shows until the check answers.
    • Try again stays busy (aria-busy and aria-disabled, not natively disabled) and keeps its focus while the retry runs. It keeps it again if the retry fails, and the failure is announced afresh (failureKey).
    • A retry that works hands focus to the dialog's words (tabIndex={-1}), then shows Connect or the not-configured path.
    • While the first check runs, Connect is rendered disabled, so OAuth can't start before the state is known. It sits in the same place, so nothing shifts.
  • Reauth buttons: GoogleReauthButton and MicrosoftReauthButton take an optional disabled.
  • Copy: documents.cloudImport.appStatusLoadFailed in EN, DE and FR. There is no ß, so no de-CH override is needed.
  • Docs: one sentence in docs/{en,de,fr}/platform/knowledge/documents.md says the dialog offers Try again instead of the connect button when the check fails.
  • Register: a line in services/platform/tests/manual/reference/automation.md, directly after the notification-read paragraph.

The successful paths are unchanged: configured: true shows the guidance and an enabled Connect, and configured: false shows the not-configured text, with the settings button for an admin.

How I verified it

  • New suite: cloud-import-connect-dialog.app-status.test.tsx runs the real useBackendQuery, adapter row, backendFetch and retry policy against syntheticBackend() and serviceUnavailable(). It passes 19/19 for both providers:
    • a failed check, with no Connect, no guidance and no settings path;
    • a held retry: busy, focus kept, a second click doesn't start another request, then recovery with focus handed to the words;
    • a retry that fails again: alert, node and focus kept;
    • a retry that finds no app, with the settings path that navigates;
    • the interrupted-import dialog;
    • the held first check, with Connect disabled and then enabled;
    • the configured and member not-configured answers;
    • the alert in EN, DE and FR.
  • Red on main: with main's three component sources swapped in, 15 of the 19 fail. The 4 that pass are the unchanged successful-answer cases.
  • Related suites: cloud-import-dialogs.{import-outcome,lapsed-session,listing-failure} and cloud-disconnect-buttons together with the new file pass 126/126 (--project client, one worker).
  • Other checks:
    • lib/i18n/messages.test.ts passes 24/24.
    • The docs tests docs, locale-outline, locale-translation and links pass 27/27.
    • bun tools/lint-manual/cli.ts is ok.
    • Scoped type-aware oxlint on the four TS files exits 0 with no findings, and oxfmt --check is clean.
    • A scoped tsc --noEmit over the changed files plus documents-action-menu.tsx and the import-outcome test exits 0 with 0 errors.
  • Backend: GET /cloud-import/oauth-app-status sits behind only requireSession and requireOrgMember, so members can read it. A member doesn't get stuck on the alert through a 403.

Commits (head ba2473a1d)

  1. 7dba5f793 fix(platform): the fix, its suite, the copy, the docs and the register line. It was built on 3ba3b8679 and rebased onto f18ecf0b1 before the first push. The range-diff is = (113f1003e became 7dba5f793), and the tree equals git merge-tree of main and the old head.
  2. 2b8fc5676 test(platform): the suite now waits for the busy state, and for a failed retry to settle (exactly twice the first failure's requests), before it judges them. Against main's sources it still fails 15 of 19; the 4 that pass are the unchanged successful answers.
  3. ba2473a1d docs(platform): the German docs call the control a Schaltfläche, as the rest of the German docs do.

Left open, deliberately

  • A failed background refresh after an answer stays silent. The dialog keeps the last answer (readStateOf(...).stale isn't surfaced), because a known configuration is enough to start consent.
  • TALE-316 is not folded in. That card covers Settings > Connectors labelling a failed read of the same status as Not configured.
  • Not run here: a real-browser pass (layout and screen-reader announcement).

Closes #3864

The Documents connect dialog read a failed OAuth-app status check as an
app that is set up: the ordinary not-connected words and a live Connect,
no failure named and no way to run the check again (#3864).

The dialog now reads the check through readStateOf. While the check has
failed, a destructive alert names it in EN/DE/FR with Try again in place
of the guidance, and neither Connect nor the connector-settings path
shows. Try again stays busy and keeps its focus while the check runs
again; a check that works hands focus to the dialog's words. Connect is
disabled while the first check runs. A successful configured or
not-configured answer reads as before.

Closes #3864
@yannickmonney

Copy link
Copy Markdown
Contributor Author

ACCEPT — independent review of exact head ba2473a1dc110c55e0db66a837a775b5872fb0a4 (PR #4378, TALE-292, closes #3864).

Reviewed independently by Codex #8, not implementer Claude #6. No blocking findings.

  • Failed first app-status reads show a descriptive role=alert with Try again, distinct from an unconnected account or a missing OAuth app. Connect is disabled before the first answer and absent during failure/retry. Both providers share this behavior.
  • Retry retains the alert and focused button, exposes aria-busy/aria-disabled with a spinner, prevents duplicate activation, and settles after another failure. Recovery removes the error and transfers focus to guidance; configured recovery enables Connect, missing-app recovery selects the correct admin/settings or member/ask-an-admin path. Interrupted-import description remains intact.
  • EN/DE/FR error copy and document additions are consistent, including the German “Kann Tale nicht prüfen…” sentence and “Erneut versuchen”. The automation.md paragraph follows “Failed single-notification and bulk reads…” and survives composition without collision.

Verification at this head using existing dependencies and /opt/node/bin/node:

  • New app-status suite: 19/19 passed, one worker.
  • Adjacent cloud-import-dialogs.import-outcome suite: 65/65 passed, one worker, 30-second per-test ceiling.
  • Scoped oxlint on four changed TSX files, including type-aware rules: exit 0. Scoped oxfmt: passed on all four eligible files; Markdown/YAML are excluded by the repository formatter config.
  • Scoped TypeScript semantic/syntax diagnostics on the same four files using repository compiler options and existing ambient/setup declarations: 0 diagnostics; no whole-workspace type check.
  • Re-read all 78 GitHub checks on the exact head: 53 success, 24 skipped, 1 neutral, all completed. These are CI results, not a claim that cached jobs executed afresh.
  • Re-fetched main: abb19b9d82c5a73ca6163db53773f09f3a37ba4f. Read-only merge-tree is clean (36c51d8872d92838ae8f18e3b747ea20deceb787); GitHub reports CLEAN/MERGEABLE.

Local verification notes: the isolated archive needed a Vite filesystem allowlist for the existing dependency directory. The initial adjacent-suite run hit a five-second timeout and cascading render failures; a bounded sample passed on both head and main, and the complete head suite subsequently passed with the larger ceiling. Real-browser layout and screen-reader speech were not exercised in this light review.

Delivery fallback for TALE-292 and TALE-359 (3729d02a-eb44-42b2-a68e-1bec2cebbcd6): workspace_status returned unavailable/not_granted, so direct task comments could not be posted. This PR comment carries the same exact-head verdict for both tasks as requested. No push, merge, CI rerun, or status change was performed.

@yannickmonney
yannickmonney merged commit 966fd6a into main Oct 5, 2026
@yannickmonney
yannickmonney deleted the fix/cloud-import-app-status-read-failure branch October 5, 2026 19:12
@yannickmonney

Copy link
Copy Markdown
Contributor Author

TALE-896 delegated merge report for TALE-292; fallback report for TALE-359 and TALE-360 because workspace_status returned not_granted.

Merged accepted exact head ba2473a as squash 966fd6a; issue #3864 verified CLOSED. OPEN/CLEAN and exact head rechecked before merge. All 78 checks terminal: 53 success, 24 skipped, 1 neutral; seven CI ready contexts SUCCESS. CI logs prove both platform Unit and all four UI shards uncached (0 cached/1 total). Merge-tree clean against main 1a86f23, revalidated unchanged immediately before merge. All 30 EN/DE/FR catalogs parse without duplicate keys. Composed-tree cloud-import setup, import outcome, lapsed session, listing failure and disconnect suites passed 126/126 across five files with /opt/node/bin/node, one worker and the permitted review-only server.fs.allow config. No approvals, status changes or reruns.

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): Cloud import connect treats a failed app-status read as not connected

1 participant