Skip to content

feat(research): add workspace research document CRUD - #256

Merged
BerryUIKI merged 3 commits into
mainfrom
feature/research-documents
Nov 6, 2026
Merged

BerryUIKI merged 3 commits into
mainfrom
feature/research-documents

Conversation

@BerryUIKI

Copy link
Copy Markdown
Owner

Summary

First M4 slice: research documents can be created and managed per workspace.

Backend

  • research_documents CRUD (the 0001 schema already defines the table, so no migration): list by workspace, get, create, update, delete, plus a repository search over title/content.
  • ResearchService validates workspace IDs, document titles (<=200 chars), and content size, and normalizes whitespace-only content to NULL.
  • Five commands wired through AppState: list_research_documents, create_research_document, get_research_document, update_research_document, delete_research_document.

Frontend

  • The Research page now selects a workspace, then lists its documents.
  • ResearchWorkspacePanel + editor support create, edit, and a two-step delete with toast feedback; loading, empty, and error states are covered.
  • Typed desktopApi.research API and TanStack Query hooks with invalidation.

Sources, notes, PDF/web ingestion, and semantic search remain future work.

Test plan

  • cargo fmt --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test --workspace - repository CRUD/search and service validation tests
  • pnpm typecheck
  • eslint on changed files
  • node node_modules/vitest/vitest.mjs run --pool=forks - 64 tests (5 new research panel tests)
  • pnpm build

- add create/update inputs to the research domain models
- persist documents in research_documents with list/get/update/delete/search
- validate titles, workspace ids, and content size in ResearchService
- expose the five research commands and wire ResearchService into AppState
- cover repository persistence and service validation with tests
- add typed research document API and TanStack Query hooks
- build the workspace research panel with list, editor, create, and two-step delete
- let the Research page select a workspace before managing documents
- test list, edit, create, delete, and empty states
- describe the research document commands and Research page in CLAUDE.md
- mark research projects and manual document management on the roadmap
- update the command table and changelog
@BerryUIKI
BerryUIKI merged commit bc8ac66 into main Nov 6, 2026
4 checks passed
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