Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
0bc7a91
feat(i18n): complete 100% internationalization and fix Next.js 15 com…
MisonL Dec 30, 2025
ce188fe
feat(i18n): complete 100% internationalization coverage
MisonL Dec 30, 2025
c62586b
chore(test): finalize component tests and project cleanup
MisonL Dec 30, 2025
b25df1e
test(logic): add unit tests for useModalManager hook
MisonL Dec 30, 2025
b81d709
fix(test): resolve timeout in AppSidebar tests by mocking TooltipProv…
MisonL Dec 30, 2025
7caee6c
feat(i18n): comprehensive i18n audit, fixes for hardcoded strings, an…
MisonL Dec 30, 2025
88d5bc0
fix(i18n): resolve TypeScript warnings and improve translation hook s…
MisonL Dec 31, 2025
aa2f7ad
feat(i18n): complete internationalization implementation with Docker …
MisonL Dec 31, 2025
e1145e8
fix(i18n): resolve localization errors, duplicates, and type issues
MisonL Dec 30, 2025
d7753e4
chore(i18n): finalize 100% internationalization coverage
MisonL Dec 30, 2025
9e91bb9
chore(test): supplement i18n test cases and cleanup redundant files
MisonL Dec 30, 2025
d3c71b8
fix(test): resolve lint type errors and finalize delivery documents
MisonL Dec 30, 2025
154856c
feat(i18n): finalize full internationalization and zh-TW localization
MisonL Dec 30, 2025
f8dcf3e
fix(frontend): add missing devDependency and fix build tsconfig
MisonL Dec 30, 2025
0c4bf20
feat(ui): enhance sidebar hover effects with better visual feedback
MisonL Dec 31, 2025
47a0a65
fix(frontend): resolve accessibility, i18n, and lint issues
MisonL Jan 1, 2026
300aef2
fix: address all 21 PR feedback items from cubic-dev-ai bot
MisonL Jan 1, 2026
93146c7
fix: remove duplicate locale keys and add missing zh-CN translations
MisonL Jan 1, 2026
03e4b5e
docs: remove info.md
MisonL Jan 1, 2026
b2b4736
fix: remove duplicate notebook keys and unused ts-expect-error
MisonL Jan 1, 2026
3fd5802
fix(a11y): fix unassociated labels in search page
MisonL Jan 1, 2026
2e70253
fix(a11y): fix unassociated labels across multiple components
MisonL Jan 1, 2026
932a554
Merge remote-tracking branch 'origin/main' into feat/localization-tes…
MisonL Jan 15, 2026
c0402ef
chore: revert to npm stack and ensure i18n compatibility
MisonL Jan 15, 2026
57b9735
chore: polish zh-TW translations for better idiomatic usage
MisonL Jan 15, 2026
35f2652
fix: resolve linter errors (ruff import sort, mypy config duplicate)
MisonL Jan 15, 2026
86bce14
style: apply ruff formatting
MisonL Jan 15, 2026
2b4b808
fix: finalize upstream compliance (Dockerfile.single, i18n hooks, doc…
MisonL Jan 15, 2026
5acdc99
style: polish strings, fix timeout cleanup, and improve test mocks
MisonL Jan 15, 2026
cab3fef
fix: use relative imports in test setup to resolve IDE path errors
MisonL Jan 15, 2026
95b4a5e
perf(docker): optimize build speed by removing apt-get upgrade and bu…
MisonL Jan 15, 2026
9a2919d
fix(a11y): resolve 16 form field accessibility warnings in notebook a…
MisonL Jan 15, 2026
20774a8
fix(a11y): resolve 4 button and 1 select field accessibility warnings…
MisonL Jan 15, 2026
e6e703f
fix(a11y): resolve redundant attributes and residual warnings in tran…
MisonL Jan 15, 2026
9efe82c
fix(i18n): deep fix for language switch hang using proxy protection a…
MisonL Jan 15, 2026
8f5468e
fix(a11y): add name attributes to ModelSelector, TransformationPlaygr…
MisonL Jan 15, 2026
ab81f51
fix: add missing Label import to SourceDetailContent
MisonL Jan 15, 2026
5b17532
fix(i18n): use native react-i18next in LanguageLoadingOverlay to prev…
MisonL Jan 15, 2026
08e82ee
fix(i18n): rewrite use-translation Proxy with strict depth limit and …
MisonL Jan 15, 2026
443fb14
fix: add type assertion to fix TypeScript comparison error
MisonL Jan 15, 2026
6ab6a0e
fix(i18n): disable useSuspense to prevent thread hang during language…
MisonL Jan 15, 2026
0b82e19
fix(i18n): add infinite loop detection circuit breaker to useTranslat…
MisonL Jan 15, 2026
bcde123
fix(i18n): update traditional chinese label to native script in en-US
MisonL Jan 15, 2026
3d25a3f
feat: add new localization strings for notebook and note management.
MisonL Jan 15, 2026
9bfa7db
fix: resolve config priority, docker build deps, and ui glitches
MisonL Jan 15, 2026
8a49151
Merge remote-tracking branch 'origin/main' into feat/i18n-zh-cn-tw
MisonL Jan 15, 2026
c0b1d3d
refactor: improve ui details and test coverage based on feedback
MisonL Jan 15, 2026
ba4da23
refactor: improve ui details (version check/lang toggle) and test cov…
MisonL Jan 15, 2026
1dc2dec
fix: polish language matching and test cleanup
MisonL Jan 15, 2026
210eb8e
fix(test): update mocks to resolve timeouts and proxy errors
MisonL Jan 15, 2026
b2eabd4
fix(frontend): restore tsconfig.json structure and enable IDE support…
MisonL Jan 15, 2026
d31845a
fix: address PR review findings and resolve CI OIDC failure
MisonL Jan 15, 2026
bf6aa14
fix: merge exception headers in custom handler
MisonL Jan 15, 2026
97307ce
fix: comprehensive PR review remediations and async performance fixes
MisonL Jan 15, 2026
0aaf868
refactor: address all PR #371 review feedback
MisonL Jan 15, 2026
eb8a1f6
fix: add jest-dom types for test files
MisonL Jan 15, 2026
c7477bb
fix: address remaining review issues
MisonL Jan 15, 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
92 changes: 32 additions & 60 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,63 +1,35 @@
notebooks/
data/
.uploads/
.venv/
.env
sqlite-db/
temp/
google-credentials.json
docker-compose*
.docker_data/
docs/
surreal_data/
surreal-data/
notebook_data/
temp/
*.env
.git/
.github/
# Git
.git
.gitignore

# Frontend build artifacts and dependencies
frontend/node_modules/
frontend/.next/
frontend/.env.local
# Python
__pycache__
*.pyc
*.pyo
*.pyd
.venv
venv
ENV
env
.pytest_cache
.mypy_cache
.ruff_cache

# Cache directories (recursive patterns)
**/__pycache__/
**/.mypy_cache/
**/.ruff_cache/
**/.pytest_cache/
**/*.pyc
**/*.pyo
**/*.pyd
.coverage
.coverage.*
htmlcov/
.tox/
.nox/
.cache/
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
# Frontend
frontend/node_modules
frontend/.next
frontend/dist
frontend/out
frontend/.env*
frontend/*.log

# IDE and editor files
.vscode/
.idea/
*.swp
*.swo
*~

# OS files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db


.quarentena/
surreal_single_data/
# Project
.antigravity
.gemini
tmp
data
mydata
*.db
*.log
docker.env
.env
5 changes: 3 additions & 2 deletions .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
issues: read
pull-requests: write
issues: write
id-token: write

steps:
Expand All @@ -38,6 +38,7 @@ jobs:
id: claude-review
uses: anthropics/claude-code-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
plugins: 'code-review@claude-code-plugins'
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/claude.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
issues: read
pull-requests: write
issues: write
id-token: write
actions: read # Required for Claude to read CI results on PRs
steps:
Expand All @@ -34,6 +34,7 @@ jobs:
id: claude
uses: anthropics/claude-code-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}

# This is an optional setting that allows Claude to read CI results on PRs
Expand Down
16 changes: 11 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/

Copy link
Contributor

Choose a reason for hiding this comment

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

P2: COPY . /app can overwrite the freshly built /app/.venv because .dockerignore is missing; host .venv or other build artifacts will be copied into the image, making builds non-deterministic.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At Dockerfile, line 36:

<comment>`COPY . /app` can overwrite the freshly built /app/.venv because .dockerignore is missing; host .venv or other build artifacts will be copied into the image, making builds non-deterministic.</comment>

<file context>
@@ -1,36 +1,57 @@
 
-# Stage 3: Runtime
+# Copy the rest of the application code
+COPY . /app
+
+# Install frontend dependencies and build
</file context>

# Install system dependencies required for building certain Python packages
# Add Node.js 20.x LTS for building frontend
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
gcc g++ git make \
# NOTE: gcc/g++/make removed - uv should download pre-built wheels. Add back if build fails.
# NOTE: gcc/g++/make required for some python dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
build-essential \
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
Expand All @@ -35,7 +37,11 @@ COPY . /app

# Install frontend dependencies and build
WORKDIR /app/frontend
ARG NPM_REGISTRY=https://registry.npmjs.org/
COPY frontend/package.json frontend/package-lock.json ./
RUN npm config set registry ${NPM_REGISTRY}
RUN npm ci
COPY frontend/ ./
RUN npm run build

# Return to app root
Expand All @@ -46,7 +52,7 @@ FROM python:3.12-slim-bookworm AS runtime

# Install only runtime system dependencies (no build tools)
# Add Node.js 20.x LTS for running frontend
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
Copy link
Owner

Choose a reason for hiding this comment

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

I am concerned that removing upgrade could expose the app to vulnerability. Why did you propose this? Any special reason?

RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends \
ffmpeg \
supervisor \
curl \
Expand All @@ -63,8 +69,8 @@ WORKDIR /app
# Copy the virtual environment from builder stage
COPY --from=builder /app/.venv /app/.venv

# Copy the application code
COPY --from=builder /app /app
# Copy the source code (the rest)
COPY . /app

# Ensure uv uses the existing venv without attempting network operations
ENV UV_NO_SYNC=1
Expand Down
103 changes: 39 additions & 64 deletions Dockerfile.single
Original file line number Diff line number Diff line change
@@ -1,51 +1,39 @@
# Build stage
FROM python:3.12-slim-bookworm AS builder

# Install uv using the official method
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
# Stage 1: Frontend Builder
FROM node:20-slim AS frontend-builder
WORKDIR /app/frontend

# Install system dependencies required for building certain Python packages
# Add Node.js 20.x LTS for building frontend
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
gcc g++ git make \
curl \
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
# Copy dependency files first to leverage cache
COPY frontend/package.json frontend/package-lock.json ./
ARG NPM_REGISTRY=https://registry.npmjs.org/
RUN npm config set registry ${NPM_REGISTRY}
RUN npm ci

# Set build optimization environment variables
ENV MAKEFLAGS="-j$(nproc)"
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV UV_COMPILE_BYTECODE=1
ENV UV_LINK_MODE=copy
# Copy the rest of the frontend source
COPY frontend/ ./
# Build the frontend
RUN npm run build

# Set the working directory in the container to /app
# Stage 2: Backend Builder
FROM python:3.12-slim-bookworm AS backend-builder
# Install build dependencies
RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends build-essential && rm -rf /var/lib/apt/lists/*
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
WORKDIR /app

# Copy dependency files and minimal package structure first for better layer caching
# Set build optimization environment variables
ENV UV_HTTP_TIMEOUT=120

# Copy dependency files first
COPY pyproject.toml uv.lock ./
COPY open_notebook/__init__.py ./open_notebook/__init__.py

# Install dependencies with optimizations (this layer will be cached unless dependencies change)
# Install dependencies
RUN uv sync --frozen --no-dev

# Copy the rest of the application code
COPY . /app

# Install frontend dependencies and build
WORKDIR /app/frontend
RUN npm ci
RUN npm run build

# Return to app root
WORKDIR /app

# Runtime stage
# Stage 3: Runtime
FROM python:3.12-slim-bookworm AS runtime

# Install runtime system dependencies including curl for SurrealDB installation
# Add Node.js 20.x LTS for running frontend
# Install runtime dependencies
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
ffmpeg \
supervisor \
Expand All @@ -57,47 +45,34 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y \
# Install SurrealDB
RUN curl --proto '=https' --tlsv1.2 -sSf https://install.surrealdb.com | sh

# Install uv using the official method
# Install uv (optional but helpful for some scripts)
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/

# Set the working directory in the container to /app
WORKDIR /app

# Copy the virtual environment from builder stage
COPY --from=builder /app/.venv /app/.venv

# Copy the application code
COPY --from=builder /app /app
# Copy backend virtualenv and source code
COPY --from=backend-builder /app/.venv /app/.venv
COPY . /app/

# Copy built frontend from builder stage
COPY --from=builder /app/frontend/.next/standalone /app/frontend/
COPY --from=builder /app/frontend/.next/static /app/frontend/.next/static
COPY --from=builder /app/frontend/public /app/frontend/public
# Copy built frontend from standalone output
COPY --from=frontend-builder /app/frontend/.next/standalone /app/frontend/
COPY --from=frontend-builder /app/frontend/.next/static /app/frontend/.next/static
COPY --from=frontend-builder /app/frontend/public /app/frontend/public

# Create directories for data persistence
# Setup directories and permissions
RUN mkdir -p /app/data /mydata

# Copy and make executable the wait-for-api script
COPY scripts/wait-for-api.sh /app/scripts/wait-for-api.sh
# Ensure wait-for-api script is executable
RUN chmod +x /app/scripts/wait-for-api.sh

# Expose ports for Frontend and API
EXPOSE 8502 5055

# Copy single-container supervisord configuration
# Copy supervisord configuration
COPY supervisord.single.conf /etc/supervisor/conf.d/supervisord.conf

# Create log directories
RUN mkdir -p /var/log/supervisor

# Runtime API URL Configuration
# The API_URL environment variable can be set at container runtime to configure
# where the frontend should connect to the API. This allows the same Docker image
# to work in different deployment scenarios without rebuilding.
#
# If not set, the system will auto-detect based on incoming requests.
# Set API_URL when using reverse proxies or custom domains.
#
# Example: docker run -e API_URL=https://your-domain.com/api ...
# Expose ports
EXPOSE 8502 5055

# Set startup command
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
Loading
Loading