* feat: content-type aware chunking and unified embedding
- Add chunking.py with HTML, Markdown, and plain text detection
- Add embedding.py with mean pooling for large content
- Create dedicated commands: embed_note, embed_insight, embed_source
- Use fire-and-forget pattern for embedding via submit_command()
- Refactor rebuild_embeddings_command to delegate to individual commands
- Remove legacy commands and needs_embedding() methods
- Reduce chunk size to 1500 chars for Ollama compatibility
- Update CLAUDE.md documentation for new architecture
Fixes#350, #142
* fix: address code review issues
- Note.save() now returns command_id for tracking embedding jobs
- Add length check after generate_embeddings() to fail fast on mismatch
- Add numpy as explicit dependency (was transitive)
- Remove hardcoded chunk sizes from docstrings
* docs: address code review comments
- Rename "SYNC PATH" to "DOMAIN MODEL PATH" in embedding router
- Add test_chunking.py and test_embedding.py to Testing Strategy
- Clarify auto-embedding behavior for each domain model
* fix: clean thinking tags from prompt graph output
Adds clean_thinking_content() to prompt.py to handle extended thinking
models that return <think>...</think> tags. This fixes empty titles
when saving notes from chat.
* chore: remove local docker-compose from git
* fix(frontend): handle null parent_id in search results
Add defensive check for null parent_id in search results to prevent
"Cannot read properties of null (reading 'split')" error. This can
happen with orphaned records in the database.
* fix: cascade delete embeddings and insights when source is deleted
When deleting a Source, now also deletes associated:
- source_embedding records
- source_insight records
This prevents orphaned records that cause null parent_id errors
in vector search results.
* fix: add cleanup for orphan embedding/insight records in migration 10
Deletes source_embedding and source_insight records where the
linked source no longer exists (source.id = NONE).
* chore: bump esperanto to 2.16
Increases ctx_num for Ollama models to accommodate larger notebook
context windows. See: https://github.com/lfnovo/esperanto/pull/69
* docs: add conda installation instructions to README
docs: add conda installation instructions to README
* docs: add conda environment setup as an alternative to uv
docs: add conda environment setup as an alternative to uv
Change embedded check from `!= NONE` to `!= []` because SurrealDB's
SELECT VALUE returns an empty array [] when no results found, not NONE.
The comparison `[] != NONE` evaluates to true, causing all sources to
incorrectly show as embedded.
Fixes#397
* fix(i18n): resolve podcast dialog translation infinite loop and profile issues
- Remove incorrect translation keys for user-defined episode profiles
- Cache translation strings in ContentSelectionPanel to avoid repeated
Proxy accesses that triggered infinite loop detection
- Stabilize useEffect dependencies with dataKey pattern to prevent
re-initialization on every keystroke
- Replace unstable sourcesQueries prop with stable fetchingNotebookIds set
- Clean up unused getSourceModes function and TranslationKeys import
* chore: bump lock
* chore: bump version to 1.5.1 and update CHANGELOG
* fix: guard .join() call in dataKey when query data is undefined
* fix(api): use FETCH command instead of async status lookups for sources list
Replace N async calls to surreal-commands with SurrealDB FETCH clause
to resolve command status in a single query. This eliminates the
command status cascade bottleneck.
* perf(db): add indexes on source field for insights and embeddings
Add migration #10 that creates indexes on the `source` field of
`source_insight` and `source_embedding` tables. These indexes
dramatically improve the performance of source listing queries
that use subqueries to count insights and check embedding existence.
Performance improvement: ~8.5s -> ~0.3s for 30 sources (28x faster)
* perf(db): make index concurrent
* fix: add IF NOT EXISTS to index definitions for idempotency
* fix: address code review feedback
- Add IF EXISTS to rollback migration for safer rollbacks
- Add fallback for unresolved command references (status = "unknown")
* fix(i18n): resolve podcast dialog translation infinite loop and profile issues
- Remove incorrect translation keys for user-defined episode profiles
- Cache translation strings in ContentSelectionPanel to avoid repeated
Proxy accesses that triggered infinite loop detection
- Stabilize useEffect dependencies with dataKey pattern to prevent
re-initialization on every keystroke
- Replace unstable sourcesQueries prop with stable fetchingNotebookIds set
- Clean up unused getSourceModes function and TranslationKeys import
* chore: bump lock
* chore: bump version to 1.5.1 and update CHANGELOG
* fix: guard .join() call in dataKey when query data is undefined
- Add complete pt-BR locale with 750+ translated strings
- Register pt-BR in locale registry and language selector
- Add date-fns ptBR locale for date formatting
- Update README and CLAUDE.md documentation
* chore: post-i18n cleanup and version bump to 1.5.0
- Restore missing .dockerignore entries (notebook_data, surreal_data, docs, etc.)
- Fix lint command for Next.js 16 (use eslint directly instead of next lint)
- Remove aria-describedby={undefined} causing Radix UI warnings
- Bump version to 1.5.0
- Update CHANGELOG with i18n features
- Add multi-language UI mention to README
- Add i18n contribution guide to README.dev
- Document i18n system in CLAUDE.md files
Closes#344, #349, #360
* docs: fix provider order in CLAUDE.md to match layout.tsx
Replace cross-env with a simple Node.js wrapper script that:
- Respects externally supplied PORT environment variable
- Falls back to 8502 if PORT is not set
- Works cross-platform without extra dependencies
- No runtime dependencies beyond Node.js itself
Changes:
- Add start-server.js wrapper script
- Update package.json to use wrapper
- Remove cross-env dependency
- Copy start-server.js in Dockerfile
This fixes both issues:
1. Preserves PORT fallback behavior (PORT can be overridden)
2. No extra runtime dependencies needed
Replace POSIX-only PORT=${PORT:-8502} syntax with cross-env
to ensure npm run start works on Windows and other platforms.
- Install cross-env as dev dependency
- Update start script to use cross-env PORT=8502
Add PORT environment variable with 8502 fallback to ensure
npm run start defaults to expected port even when run outside
of Docker/supervisord context.
Replace 'next start' with 'node server.js' to properly utilize
Next.js standalone output mode in Docker deployments.
Changes:
- Update supervisord.conf to run standalone server
- Update supervisord.single.conf to run standalone server
- Update package.json start script for consistency
This eliminates the startup warning and follows Next.js best
practices for optimized Docker deployments.
- Upgrade Next.js from 15.4.10 to 16.1.1
- Upgrade React from 19.1.0 to 19.2.3
- Rename middleware.ts → proxy.ts (Next.js 16 requirement)
- Update function name: middleware → proxy
- Enable proxyClientMaxBodySize configuration (now supported in Next.js 16)
- Update documentation to reference Next.js 16 requirement
- Fix upload size limit issue for files >10MB
This upgrade fixes GitHub issue #361 where users cannot upload files
larger than 10MB. The proxyClientMaxBodySize configuration option was
introduced in Next.js 16.1+ and allows configuring the proxy body size
limit to 100MB.
Fixes#361
Related to PR #405
Previously, uploaded files remained on disk after source deletion,
causing disk space accumulation and potential privacy concerns.
The Source.delete() method now removes associated files before
database cleanup, with graceful error handling to prevent
database inconsistency if file deletion fails.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The setup_guide directory contained only redirect files pointing to the
new docs location and outdated example files that are already available
in the root directory.
- Removed setup_guide/README.md (redirect only)
- Removed setup_guide/DOCKER_SETUP_ADVANCED.md (redirect only)
- Removed setup_guide/docker-compose.yml (outdated)
- Removed setup_guide/docker.env (outdated)
- Updated .gitignore to remove setup_guide reference
Add conditional logic to ensure only one workflow runs per PR:
- pull_request_target: Only for fork PRs (external contributors)
- pull_request: Only for same-repo PRs (internal branches)
This prevents both triggers from firing simultaneously and causing
conflicts or duplicate reviews.
Prevent GITHUB_TOKEN from being stored in .git/config when
checking out PR code in pull_request_target workflows. This
is a security best practice to prevent untrusted code from
potentially accessing stored credentials.
While the Claude Code action doesn't execute arbitrary PR code,
this follows defense-in-depth security principles to minimize
attack surface when handling untrusted code from forks.
Add both pull_request and pull_request_target triggers to support:
- pull_request: Same-repo PRs (works immediately with changed workflow)
- pull_request_target: Fork PRs (provides OIDC tokens)
This resolves the chicken-and-egg problem where pull_request_target
uses the base branch's workflow file, preventing the workflow from
running when the workflow file itself is changed in the PR.
Switch from pull_request to pull_request_target event to enable
OIDC token access for external contributor PRs. This allows the
Claude Code action to authenticate properly when reviewing PRs
from forks.
Also added explicit PR head SHA ref to checkout to ensure we
review the correct code.
Fixes workflow failure: Unable to get ACTIONS_ID_TOKEN_REQUEST_URL
Reduces CI time by only building the multi-container Dockerfile
during pull requests. The single-container build is still available
in the production build-and-release workflow.
Next.js 15 accepts proxyClientMaxBodySize at runtime but TypeScript types
for ExperimentalConfig don't include it yet, causing build failures.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Increase the proxyClientMaxBodySize from 10MB (default) to 100MB to allow
larger files to be uploaded through the /api/* rewrite proxy to FastAPI.
Fixes#361
- Added custom exception handler to ensure CORS headers are included in
all HTTP error responses from the API
- Added documentation for 413 (Payload Too Large) errors when behind
reverse proxies (nginx, traefik, kubernetes ingress)
- Added client_max_body_size to nginx configuration examples
- Documented how to configure CORS headers for proxy-level error responses
Fixes#401