Update build-dev workflow to:
- Push v1-dev and v1-dev-single tags on merge to main
- Build both regular and single-container images
- Push to both GHCR and Docker Hub
- Keep test-only builds for PRs (no push)
This enables users to test unreleased features via:
- docker pull ghcr.io/lfnovo/open-notebook:v1-dev
- docker pull lfnovo/open_notebook:v1-dev
* chore: bump content-core to support html to markdown
* feat: detect HTML content in clipboard for text sources
- Add paste handler to detect text/html format in clipboard
- Use HTML content instead of plain text when available
- Display info message when HTML is detected
- Add translations for all supported languages (en-US, pt-BR, ja-JP, zh-CN, zh-TW)
* fix: reset HTML detection banner on plain text paste
Clear the hasHtmlContent flag when pasting plain text (no HTML in
clipboard) so the banner doesn't persist incorrectly after replacing
HTML content with plain text.
* fix: improve error handling in repo_create and repo_insert
When SurrealDB encounters an error (e.g., schema validation failure),
it may return a string error message instead of the expected record.
Previously, this caused a confusing "'str' object has no attribute
'items'" error in base.py:save().
This change adds error string detection to repo_create() and repo_insert(),
raising a RuntimeError with the actual SurrealDB error message. This helps
debug issues like #469 by showing the underlying database error.
Related to #469
* fix: preserve error details in repo_insert RuntimeError handling
The RuntimeError with SurrealDB error message was being caught by
the broad 'except Exception' block and replaced with a generic
'Failed to create record' message.
Now RuntimeError is caught separately and re-raised, preserving
the actual error details for debugging.
* feat: decrease chunking size for maximum ollama compatibility
* docs: improve i18n info on Claude.md
* feat: add cascade deletion for notebooks with delete preview
- Add Notebook.get_delete_preview() to show counts of affected items
- Add Notebook.delete(delete_exclusive_sources) for cascade deletion
- Always delete notes when notebook is deleted
- Allow user to choose: delete or keep exclusive sources
- Shared sources are always unlinked but never deleted
- Add NotebookDeleteDialog component with radio button options
- Add delete-preview API endpoint
- Update delete endpoint with delete_exclusive_sources param
- Add i18n support for all 5 locales
Closes#77
* docs: remove harcoded config settings
When async_processing=False, the sync path calls execute_command_sync()
which internally uses asyncio.run(). This fails when called from FastAPI's
already-running event loop with 'asyncio.run() cannot be called from a
running event loop'.
Wrapping the call in asyncio.to_thread() runs it in a thread pool executor,
avoiding the event loop conflict while preserving the synchronous behavior
from the API consumer's perspective.
Fixes#453
* docs: update CHANGELOG for v1.6.0 release
* fix: connection error with llama.cpp and OpenAI-compatible providers
Bump Esperanto to 2.17.2 which fixes LangChain connection errors
caused by garbage collection closing shared HTTP clients.
Closes#465
* docs: update CHANGELOG for v1.6.0 release
* fix: improve error logging for chat model configuration issues (#358)
- Add detailed error logging in provision.py when model lookup fails
- Add warning logging in models.py when default model is not configured
- Add traceback logging in chat router exception handler
- Update Ollama docs with model name configuration guidance
- Update troubleshooting docs with "Failed to send message" solutions
- Bump version to 1.6.1
* chore: uvlock
* 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.