Skip to content

First-run onboarding: empty states, upload feedback & first-chat path (JOB-5)#59

Open
Pragadeesh122 wants to merge 2 commits into
mainfrom
job-5-first-run-onboarding
Open

First-run onboarding: empty states, upload feedback & first-chat path (JOB-5)#59
Pragadeesh122 wants to merge 2 commits into
mainfrom
job-5-first-run-onboarding

Conversation

@Pragadeesh122

Copy link
Copy Markdown
Owner

Summary

Tightens the first five minutes for a new user: create project → upload first doc → first grounded answer (JOB-5). Frontend-only, no backend changes.

First-run audit — friction points found

  1. Empty project pushes generic prompts, not "upload a doc." A brand-new project opened straight into the general chat empty state ("Browse the web", "Query the database") — nothing pointed the user at uploading a document, which is the whole point of a project.
  2. Silent upload failures. handleUploadFile swallowed errors to console.error; a bad type / too-large file / backend error left the spinner stopping with no explanation.
  3. Wrong size limit in the UI. The dropzone said "Up to 25 MB" but the backend (api/projects.py) allows 100 MB.
  4. Opaque processing. Documents showed a bare spinner with no "indexing / ready shortly" cue, and failed docs showed nothing.
  5. Weak no-projects state. Just tiny grey "No projects yet" text; the only entry point was a 14px +.
  6. No loading/error on project creation. Async create had no spinner and dropped errors to the console.
  7. Generic suggestions even after upload. Once a doc was indexed, the empty state still offered generic prompts rather than "ask about your documents."

Changes

  • ChatArea — project-aware empty state: when a project has no ready document, a hero upload dropzone (drag + click, wired to the real upload handler) with an indexing state and inline errors; once docs are ready, suggestions switch to grounded questions (summarize / ask about your documents).
  • ProjectPage — pre-flight validation + inline upload-error state, threaded into both the sidebar and the chat hero.
  • ProjectSidebar — corrected size copy (100 MB), inline upload-error banner, and a clearer per-document status line ("Indexing… ready to chat shortly" / failure reason).
  • Sidebar — no-projects CTA ("Create your first project"); project creation now shows a spinner and surfaces errors inline.
  • lib/upload.ts — single source of truth for supported types / size limit, kept in sync with the backend so client validation can't drift.

⚠️ Visual-quality decisions for CEO review (no designer on staff)

  • New upload hero in the empty project view (dashed emerald dropzone, ~py-8). Matches existing emerald/zinc language but is a new focal element — worth an eyeball.
  • No-projects sidebar CTA card replaces the one-line text.
  • Copy choices (e.g. "Add a document to get started", "ready to chat shortly"). Happy to adjust tone.

Verification

  • tsc --noEmit passes (exit 0). Production next build could not run in the isolated worktree (Turbopack rejects the cross-root node_modules symlink used to typecheck) — type/compile correctness is covered by tsc.
  • Manual happy-path test plan (needs full stack — Postgres/Redis/Pinecone/MinIO):
    1. Sign in as a fresh user → /chat shows the "Create your first project" CTA.
    2. Create a project → spinner shows, redirect to the project; empty view shows the upload hero.
    3. Drag a PDF onto the hero → "Uploading…" → "Indexing…" → ready; suggestions switch to grounded questions.
    4. Try a .zip and a >100 MB file → friendly inline errors, no silent failure.
    5. Ask a grounded question → first cited answer.

🤖 Generated with Claude Code

Pragadeesh122 and others added 2 commits July 16, 2026 21:16
First-run flow improvements for the create-project -> upload -> first
grounded answer path (JOB-5):

- Empty-project chat area now guides the user to upload their first
  document (working drag/click dropzone) instead of showing generic
  tool prompts; shows an "indexing" state and surfaces upload errors.
- Once documents are indexed, the empty state suggests grounded
  questions (summarize / ask about your documents).
- Upload failures are surfaced inline (type/size pre-validation mirrors
  the backend) instead of failing silently to the console.
- Per-document status line now explains "Indexing…" and shows failure
  reasons.
- No-projects sidebar state is now a real CTA ("Create your first
  project") and project creation shows a spinner + inline errors.
- Fixed an incorrect "Up to 25 MB" hint — the backend allows 100 MB;
  added a shared lib/upload.ts so client limits track the backend.

Co-Authored-By: Paperclip <[email protected]>
@Pragadeesh122
Pragadeesh122 force-pushed the job-5-first-run-onboarding branch from 7944d8e to 5958a41 Compare July 17, 2026 02:17
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.

1 participant