Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
9b115b3
refactor(workspaces): generalize item creation and editing
urjitc Aug 13, 2026
1273ff2
feat(workspaces): add flashcard content and study state
urjitc Aug 13, 2026
c37aac1
feat(workspaces): add flashcard study viewer
urjitc Aug 13, 2026
8e50444
refactor(workspaces): simplify flashcard study session
urjitc Aug 14, 2026
88439ad
fix(chat): preserve continuation baseline on resume
urjitc Aug 14, 2026
da18a0a
fix(chat): harden agents recovery patch
urjitc Aug 14, 2026
8c93536
fix(chat): harden recovery reconciliation
urjitc Aug 14, 2026
3bdf874
fix(workspaces): enforce flashcard data invariants
urjitc Aug 14, 2026
6868b00
feat(workspaces): polish flashcard study interactions
urjitc Aug 14, 2026
890c3cb
fix(workspaces): harden AI creation flows
urjitc Aug 14, 2026
4f9fb21
fix(workspaces): smooth flashcard transition handoff
urjitc Aug 14, 2026
a76c5a0
refactor(workspaces): clarify creation and study menus
urjitc Aug 14, 2026
9811d56
perf(workspaces): lazy-load flashcard motion
urjitc Aug 14, 2026
67b35af
style(workspaces): format flashcard review fixes
urjitc Aug 14, 2026
958074c
feat(workspaces): expose scalable flashcard study reads
urjitc Aug 14, 2026
100e41c
refactor(workspaces): make item views feature-owned
urjitc Aug 14, 2026
e9fe586
fix(workspaces): serialize flashcard progress writes
urjitc Aug 14, 2026
3d9ba49
refactor(chat): trim unsupported recovery cases
urjitc Aug 14, 2026
742b247
fix(workspaces): restore flashcard rating animation
urjitc Aug 14, 2026
99e5c43
fix(workspaces): animate final flashcard feedback
urjitc Aug 14, 2026
cdb6e82
style(workspaces): simplify flashcard mode menu
urjitc Aug 14, 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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
patches/*.patch whitespace=-space-before-tab
13 changes: 13 additions & 0 deletions drizzle-postgres/0003_glorious_wolf_cub.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
CREATE TABLE "workspace_item_user_states" (
"user_id" text NOT NULL,
"item_id" text NOT NULL,
"state" jsonb NOT NULL,
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
CONSTRAINT "workspace_item_user_states_user_id_item_id_pk" PRIMARY KEY("user_id","item_id")
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Deleting workspace items scans the entire user-state table because the cascading foreign key uses item_id, but the only index starts with user_id. Add an index on workspace_item_user_states(item_id) and declare the same index in the Drizzle schema.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At drizzle-postgres/0003_glorious_wolf_cub.sql, line 7:

<comment>Deleting workspace items scans the entire user-state table because the cascading foreign key uses `item_id`, but the only index starts with `user_id`. Add an index on `workspace_item_user_states(item_id)` and declare the same index in the Drizzle schema.</comment>

<file context>
@@ -0,0 +1,12 @@
+	"state" jsonb NOT NULL,
+	"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
+	CONSTRAINT "workspace_item_user_states_user_id_item_id_pk" PRIMARY KEY("user_id","item_id")
+);
+--> statement-breakpoint
+ALTER TABLE "workspace_items" DROP CONSTRAINT "workspace_items_type_check";--> statement-breakpoint
</file context>

--> statement-breakpoint
ALTER TABLE "workspace_items" DROP CONSTRAINT "workspace_items_type_check";--> statement-breakpoint
ALTER TABLE "workspace_item_user_states" ADD CONSTRAINT "workspace_item_user_states_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "workspace_item_user_states" ADD CONSTRAINT "workspace_item_user_states_item_id_workspace_items_id_fk" FOREIGN KEY ("item_id") REFERENCES "public"."workspace_items"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
CREATE INDEX "workspace_item_user_states_item_id_idx" ON "workspace_item_user_states" USING btree ("item_id");--> statement-breakpoint
ALTER TABLE "workspace_items" ADD CONSTRAINT "workspace_items_type_check" CHECK ("workspace_items"."type" in ('folder', 'document', 'flashcard', 'file'));
Loading