deer-flow icon indicating copy to clipboard operation
deer-flow copied to clipboard

fix(frontend): add public showcase routes for case studies

Open DaoyuanLi2816 opened this issue 4 months ago • 0 comments

Fixes #3000

Why

Landing-page case studies currently point into the authenticated workspace, so anonymous visitors are redirected to login. The public examples need a narrow route that does not weaken the workspace auth boundary.

What changed

  • Case-study cards now open an allowlisted /showcase/[thread_id] route outside the authenticated workspace layout.
  • The showcase reuses the existing static demo client and chat UI in read-only mode.
  • Unknown thread IDs return 404, while ordinary /workspace/* routes retain their existing authentication behavior.
  • Shared chat providers were moved out of the workspace route so both layouts can use the same provider stack.

Surface area

  • [x] Frontend UI — page / component / setting / interaction under frontend/
  • [ ] Backend API — endpoint / SSE event / request-response shape under backend/app
  • [ ] Agents / LangGraph — agent node, graph wiring, langgraph.json, or prompt change
  • [ ] Sandbox — docker/ or sandboxed execution
  • [ ] Skills — change under skills/
  • [ ] Dependencies — new/upgraded entry in backend/pyproject.toml or frontend/package.json (say what it buys us)
  • [x] Default behavior change — changes existing behavior without the user opting in (default model, default setting, data shape)
  • [ ] Docs / tests / CI only — no runtime behavior change

Screenshots / Recording

No visual component changes. The existing case-study chat UI is rendered at the new public URL.

Bug fix verification

  • Test path that reproduces the bug: frontend/tests/e2e/thread-history.spec.ts
  • Did it go red on main and green on this branch? Yes — the public route is absent on main; the branch verifies an allowlisted demo loads anonymously and an unknown ID returns 404.

Validation

  • cd frontend && pnpm test — 124 files, 971 tests passed
  • cd frontend && pnpm format
  • cd frontend && pnpm check
  • cd frontend && SKIP_ENV_VALIDATION=1 DEER_FLOW_AUTH_DISABLED=1 pnpm build
  • Playwright: public showcase history and unknown-ID boundary tests passed against a production build
  • git diff --check

AI assistance

Tool(s) used: Codex

How you used it: Implemented the scoped route and regression tests from the issue discussion, reconciled the change with current main, and ran the validation above. I reviewed the final diff and validation results.

  • [x] I've read and understand every line of this change and take responsibility for it — it's not unreviewed AI output.

DaoyuanLi2816 avatar Aug 01 '26 21:08 DaoyuanLi2816