Repository navigation
fix(platform): defer chat upload success toast until indexing completes (#1457) - #2225
Conversation
Desk Review — #2225 (fix for #1457)Verdict: NOT READY — one blocking gap (test coverage of the core new behavior). The fix itself is correct and well-reasoned; CI is fully green; the only thing missing is a test that the deferred toast actually fires. CIAll required checks pass (Unit, Type check, Lint, Format, Knip, Build platform, all 16 Playwright shards, etc.). No failing or pending required checks. Tests I ran locally (bun + vitest)
What is correct (verified by code walk)
BLOCKING
Non-blocking (no action required, noted for awareness)
NOT READY — CHANGES REQUIRED: add the test coverage in (1) above for the deferred success and failure toast transitions in |
Desk Review — PR #2225 (fixes #1457)Verdict: NOT READY — CHANGES REQUIRED (single blocker: CI is red — see below). The code change itself meets the review bar; the gate is the failing CI check, which must go green before merge. What I verified
BLOCKING
Non-blocking (optional polish — not required for merge)
Once |
Desk Review — PR #2225 (fixes #1457)Verdict: READY TO MERGE. Reviewed the whole implementation (not just the diff) across correctness, robustness, elegance, tests, and boundaries, in two rounds (breadth fan-out + independent confirmation). CI & tests
What's correct
Non-blocking observations (do not gate merge)
READY TO MERGE. |
681d40f to
7645b19
Compare
Problem
When a PDF (or any RAG-indexable file) is attached in Chat, the composer flashed "uploaded successfully" the instant the bytes finished uploading — but indexing runs asynchronously afterwards and can still fail, leaving an "Index failed" badge on the same file. The toast contradicted the actual outcome.
Closes #1457
Fix
use-convex-file-upload.ts: for files the backend will RAG-index (mirrorsshouldIndexinsaveFileMetadata— non-audio, indexing not disabled,isRagIndexableFile), the immediate "uploaded successfully" toast is suppressed. Non-indexed files (images, audio/video, unsupported types, or conversations with indexing disabled) keep the instant toast since they have no further processing gate.use-file-indexing-status.ts: now owns the terminal signal. When a tracked file transitions out of a pending state (queued/running) it fires the deferred success toast oncompleted, or an "Index failed" error toast onfailed. Keying on the transition (not the absolute status) keeps a remount of an already-finished file silent and fires the success toast exactly once per upload.chat.indexingFailedDescription(en/de/fr) for the failure toast body.Tests
use-convex-file-upload.indexing-toast.cap.test.ts: an indexable PDF saves metadata but shows no immediate success toast; withdisableIndexingthe immediate toast still fires.vitest --project client(upload-hook suites) — 4 passedvitest --project server lib/i18n/messages.test.ts(i18n parity/usage enforce) — 23 passedoxlint --type-awareon changed files — 0 warnings / 0 errorstsc --noEmit— clean