Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
5a5cfe6
fix: rename TSLA demo document
suguanYang May 12, 2026
360f0fc
fix: clarify source and original file affordances
suguanYang May 12, 2026
a01c4fe
Merge pull request #57 from Ontos-AI/fix/wangbinqi/rename-tsla-demo-d…
suguanYang May 12, 2026
5c25cd5
feat: load demo documents from Knowhere API
suguanYang May 12, 2026
e75533e
fix: harden API-owned demo workspace flow
suguanYang May 12, 2026
c5b8904
fix: ignore legacy fake demo rows
suguanYang May 12, 2026
e21fbd3
fix: preserve deleted demo visibility
suguanYang May 12, 2026
7259411
fix: guard demo materialization visibility
suguanYang May 12, 2026
4b0b791
fix: keep workspace available without demo catalog
suguanYang May 12, 2026
bd418c1
Merge pull request #61 from Ontos-AI/feat/wangbinqi/notebook-api-owne…
suguanYang May 12, 2026
06c25a0
Merge pull request #62 from Ontos-AI/feat/wangbinqi/demo-documents-re…
suguanYang May 12, 2026
64b8b5b
feat: sync notebook dashboard UI
suguanYang May 12, 2026
743d6b8
feat: add chunk list search
suguanYang May 12, 2026
47b7ee8
Merge pull request #63 from Ontos-AI/feat/wangbinqi/sync-dashboard-ui
suguanYang May 12, 2026
e021e86
feat: support dev api key demo flows
suguanYang May 12, 2026
ca60725
fix: make grounded answers friendlier
suguanYang May 12, 2026
4450cee
fix: keep chunk panel focused
suguanYang May 12, 2026
a3dbadd
fix: make text original previews responsive
suguanYang May 12, 2026
cc3c7dc
fix: load materialized demo chunks from demo api
suguanYang May 13, 2026
a27a62f
fix: avoid copied demo chunk counts
suguanYang May 13, 2026
9ee238e
fix: remove chunk search, reduce page size to 50, fix logo warning
suguanYang May 13, 2026
116dae5
fix: style dashboard link as text link instead of button
suguanYang May 13, 2026
cb68b3d
feat: introduce upstash/workflow
suguanYang May 13, 2026
dfa9556
refactor: convert server-side code to Effect patterns
suguanYang May 13, 2026
5f7a1b0
fix: make document reconciliation client-driven with atomic dedup
suguanYang May 13, 2026
16750fb
fix: remap demo citations to materialized document IDs
suguanYang May 13, 2026
b07c90b
fix: make demo citation chunks use materialized document IDs
suguanYang May 13, 2026
fa83adc
perf: skip workspace DB queries for non-UUID demo source chunk requests
suguanYang May 13, 2026
0684318
fix: update schema path in drizzle config and add Upstash CLI command
suguanYang May 13, 2026
f33430b
fix: remove chunk hash link and dashboard link icon
suguanYang May 13, 2026
55a6cf7
Merge pull request #64 from Ontos-AI/bugfix/wangbinqi/add-dev-api-key
suguanYang May 13, 2026
c9a4b3e
fix: update tests for Effect-wrapped repository and reconcile depende…
suguanYang May 13, 2026
e0cb078
fix: update tests for removed chunk search, Effect HTTP client, and p…
suguanYang May 13, 2026
40b3af0
SSR demo chunks for guest first page view
suguanYang May 13, 2026
fda619d
Merge pull request #68 from Ontos-AI/fix/wangbinqi/staging-test-failures
suguanYang May 13, 2026
514384d
Merge pull request #67 from Ontos-AI/feat/wangbinqi/ssr-demo-chunks
suguanYang May 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .env.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
# Use staging when validating staging keys.
# KNOWHERE_BASE_URL=https://api-staging.knowhereto.ai

# Optional development override. When set, Notebook skips Dashboard session
# auth and Dashboard-issued JWT creation, then calls Knowhere directly with
# this key. Leave unset for production and Dashboard-authenticated staging.
# KNOWHERE_API_KEY=sk_your_development_key_here

# --- Chat provider (server-side only) ---
# Vercel AI Gateway key; AI SDK picks it up automatically
AI_GATEWAY_API_KEY=vck_your_key_here
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Upload documents, explore parsed content, and ask questions about your knowledge

2. Fill in your API keys in `.env.local`:
- `AI_GATEWAY_API_KEY` — your Vercel AI Gateway key for chat (optional `CHAT_MODEL` override)
- `KNOWHERE_API_KEY` — optional development override that skips Dashboard auth and calls Knowhere directly

3. Install dependencies and run:
```bash
Expand Down Expand Up @@ -42,6 +43,12 @@ Notebook treats Dashboard as the auth source of truth. Server-side auth calls
forward the incoming session cookie to Dashboard oRPC endpoints, including
`/api/orpc/users/getCurrentUser` and `/api/orpc/users/issueServiceJwt`.

For local development, setting server-side `KNOWHERE_API_KEY` switches Notebook
into API-key mode. In that mode the app uses a deterministic local development
user, skips Dashboard redirects and JWT issuance, and passes the configured key
directly to the Knowhere SDK. Leave it unset for production and normal
Dashboard-authenticated staging flows.

Dashboard chooses its oRPC handler by request shape and `Content-Type`.
When using Effect's `HttpClientRequest.bodyText`, pass
`"application/json"` as the body content type. Setting the header before
Expand Down
2 changes: 1 addition & 1 deletion drizzle.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { defineConfig } from "drizzle-kit";
* pnpm db:migrate # apply migrations to DATABASE_URL (prod deploy)
*/
export default defineConfig({
schema: "./src/lib/schema.ts",
schema: "./src/infrastructure/db/schema.ts",
out: "./drizzle",
dialect: "postgresql",
dbCredentials: {
Expand Down
15 changes: 15 additions & 0 deletions drizzle/0006_api_owned_demos.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
CREATE TABLE "demo_source_visibilities" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"workspace_id" uuid NOT NULL,
"demo_source_id" text NOT NULL,
"hidden_at" timestamp with time zone,
"deleted_at" timestamp with time zone,
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
);
--> statement-breakpoint
ALTER TABLE "demo_source_visibilities" ADD CONSTRAINT "demo_source_visibilities_workspace_id_workspaces_id_fk" FOREIGN KEY ("workspace_id") REFERENCES "public"."workspaces"("id") ON DELETE cascade ON UPDATE no action;
--> statement-breakpoint
CREATE UNIQUE INDEX "demo_source_visibilities_workspace_source_idx" ON "demo_source_visibilities" USING btree ("workspace_id","demo_source_id");
--> statement-breakpoint
CREATE INDEX "demo_source_visibilities_workspace_idx" ON "demo_source_visibilities" USING btree ("workspace_id");
50 changes: 50 additions & 0 deletions drizzle/0007_normalize_legacy_demo_sources.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
INSERT INTO "demo_source_visibilities" (
"workspace_id",
"demo_source_id",
"hidden_at",
"deleted_at",
"created_at",
"updated_at"
)
SELECT
"workspace_id",
"demo_key",
"deleted_at",
"deleted_at",
now(),
now()
FROM "sources"
WHERE
"demo_key" IS NOT NULL
AND "deleted_at" IS NOT NULL
ON CONFLICT ("workspace_id", "demo_source_id") DO UPDATE
SET
"hidden_at" = EXCLUDED."hidden_at",
"deleted_at" = EXCLUDED."deleted_at",
"updated_at" = now();

UPDATE "sources"
SET
"deleted_at" = now(),
"updated_at" = now()
WHERE
"demo_key" IS NOT NULL
AND "deleted_at" IS NULL
AND "knowhere_job_id" IS NULL
AND (
"knowhere_document_id" IS NULL
OR "knowhere_document_id" LIKE 'demo-doc-%'
);

UPDATE "sources"
SET
"original_blob_pathname" = NULL,
"original_blob_url" = '/api/demo-sources/' || "demo_key" || '/original',
"updated_at" = now()
WHERE
"demo_key" IS NOT NULL
AND "deleted_at" IS NULL
AND (
"original_blob_url" IS NULL
OR "original_blob_url" <> '/api/demo-sources/' || "demo_key" || '/original'
);
Loading
Loading