Release: Demo Mode, Dashboard UI Sync & Effect Refactor - #65
Merged
Merged
Conversation
…ocument fix: rename TSLA demo document
…d-demos Load demo documents from Knowhere API
…factor Merge API-owned demo workspace flow into staging
Sync Notebook UI with Dashboard styling
Replace raw fetch/async/try-catch/throw with Effect.gen, Effect.fn, Effect.tryPromise, and structured error handling across foundations, domain logic, route services, and API handlers.
Replace the automatic reconcileStaleSources background sweep with inline, per-source triggers that fire only when the client polls for source state. Add three-layer protection against duplicate workflow runs: Upstash idempotency via workflowRunId, in-memory dedup, and an atomic DB guard (UPDATE WHERE status='parsing') so concurrent workflows cannot both finalize the same source.
After demo materialization, source rows get new materialized document IDs but the seeded demo-thread citations still reference the canonical IDs. Wire up the existing replaceDemoCitationDocumentId to remap citations after materialization completes, so source citation resolution continues to work.
Two changes to complete the citation fix after demo materialization: 1. route-chunks: when serving chunks for a materialized demo source, use the source's knowhereDocumentId as the chunk documentId instead of the canonical one, so chunk resolution finds matching citations. 2. workspace-chat-workflow: after materialization, re-fetch the chat thread from the server instead of remapping citation documentIds client-side. The server-side fix (prior commit) already persisted the corrected citations; this just gets fresh data to the client. Also hide the materialization status text from the user — it now shows "Thinking" like a normal send.
Non-UUID source IDs can only be demo sources. Short-circuit loadSourceChunksEffect before getCurrentUser/ensureWorkspace to avoid unnecessary DB queries on every demo chunk page load. Also caches the upstream demo chunk API response for 5 minutes.
Drop the #chunk-<id> URL hash navigation and the LayoutDashboard icon prefix from the top-nav dashboard link.
fix: add dev API key support and demo flow improvements
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
…ncies - Use expect.any(Function) for chat route repository assertions since chatTurnPersistence.createRepository() now wraps service methods - Return Promises from reconcile mock defaults so Effect.tryPromise doesn't fail on bare vi.fn() (which returns undefined) - Add 4th "parsing" arg to markSourceFailed expectation to match updated lifecycle function signature
…age size - Remove obsolete search test from chunks-panel.test.ts (search was removed from the component in 9ee238e) - Switch workspace/client.test.ts from stubbing global fetch to mocking workspaceRouteClient (now uses Effect FetchHttpClient) - Update page size from 100 to 50 in workspace-shell test assertion (changed in 9ee238e)
Load the first demo source's parsed chunks during the server render so guest users see content immediately — no loading spinner on first visit. Uses unstable_cache with revalidate: false so the fetched chunks are shared across all users. The chunk prefetch is best-effort; if it fails, the client falls back to loading chunks on demand.
fix: update tests for Effect-wrapped repository and reconcile dependencies
SSR demo chunks for guest first page view
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary