Commit Graph
624 Commits
Author SHA1 Message Date
Bohdan Triapitsyn 76bc4f8036 release v1.8.0 2026-02-28 04:38:25 +02:00
Iuliia IvashkoandBrian-Hwang d5d0d35083 feat: redesign remote tunnel settings and named tunnel workflow (#546)
* feat: add Cloudflare Tunnel settings for desktop app

Add a 'Remote Tunnel' section in Settings (desktop-only) that lets users
start/stop a Cloudflare quick tunnel on demand, with auto-generated
password protection and a QR code for easy mobile access.

- Server: 4 new API endpoints (check/status/start/stop) reusing the
  existing cloudflare-tunnel module
- UI: TunnelSettings component with full state machine
  (checking → idle/not-available → starting → active → stopping)
- QR code rendered via the qrcode package for in-app display
- Hidden from VS Code extension (desktop/web only)

* fix: use ?token= instead of ?p= in tunnel password URLs

REST API endpoints were building passwordUrl with ?p=<token> but
SessionAuthGate reads the ?token= query param, causing QR code
auto-login to fail — the password was never extracted from the URL.

Standardize all three tunnel URL construction sites to use ?token=
so scanning the QR code correctly pre-fills and submits the password.

* feat: secure remote tunnel access with one-time connect links

* feat: redesign remote tunnel settings and access flow

* fix: cleaned up unused desktop close code path

* feat: overhaul named tunnel setup and persistence flow

* chore: align codemirror language dependency resolution

---------

Co-authored-by: Brian-Hwang <brian.hwang@cornelisnetworks.com>
2026-02-28 04:21:46 +02:00
Henry Moran a505378d79 feat(chat): show dynamic subagent type in task tool button (#545)
Display the actual subagent type (e.g., 'general', 'build') instead of hardcoded
'subAgent' in the task tool button. Changes 'session' to 'subtask' for consistency.

- Add input prop to TaskToolSummary component
- Extract subagent_type from task input
- Capitalize agent type and update button text format
2026-02-28 02:18:04 +02:00
Henry Moran 654d49067f feat: add Ollama Cloud quota provider (#544)
* feat: add Ollama Cloud quota provider

Adds ollama-cloud quota provider that reads auth cookie from
~/.config/ollama-quota/cookie and fetches usage from ollama.com/settings.
Returns 3 windows: session, weekly, and premium (X/Y). Reuses Ollama
logo via provider alias.

* docs(quota): add ollama-cloud provider entry to DOCUMENTATION.md
2026-02-28 01:38:28 +02:00
Bohdan Triapitsyn 2fb0aa9c96 fix: treat pasted absolute paths as normal messages 2026-02-28 01:38:01 +02:00
Bohdan Triapitsyn 9b182ee0cc fix: render multi-file patch diffs correctly in chat 2026-02-28 01:20:24 +02:00
Bohdan Triapitsyn 98892ca0ac fix: keep Settings open when dismissing dropdowns 2026-02-28 00:50:02 +02:00
Bohdan Triapitsyn 95c71789c4 Project actions: run commands from header on web + mobile, with SSH-forward URL opening (#542)
* feat: add project actions in header with reliable terminal run flow

- Add per-project Actions settings with icons, platform filters, and default action
- Run/stop actions from header using terminal tabs, including Ctrl+C then force-kill fallback
- Improve terminal UX with stable selection, resize handling, and smarter URL auto-open for localhost ports

* feat: add project actions UI with refined header dropdown behavior

* feat: add parent-session back button in chat

* fix: make web and desktop dev modes reliable and conflict-free

- Separate desktop and web dev ports to avoid collisions
- Add robust process-tree shutdown so Ctrl+C cleans sidecars
- Add true web HMR mode and keep service worker out of dev

* fix: linux safe scripts for dev

* feat: run project actions on web and add desktop SSH forward URL opening

* feat: add mobile project actions button with terminal tabs and tighter tab UI

* revert: remove experimental mobile terminal selection UI

* feat: show Add action button in header when empty

* fix: make retry countdown human-readable in status row

* fix: prevent nav rail actions from firing through overlays
2026-02-27 20:45:03 +02:00
Raph d948aa5557 fix: enable markdown rendering for user messages (#531)
* fix: enable markdown rendering for user messages

* fix: resolve unused parameter lint error

* fix: resolve lint errors (conditional hook and unused prop)
2026-02-27 20:22:59 +02:00
Asuta b68a10571c feat(vscode): support drag-and-drop file attachments in chat (#535)
* feat(vscode): implement file drop API for handling dropped files in VS Code

* refactor(vscode): deduplicate attachment parsing for picked and dropped files
2026-02-27 20:21:12 +02:00
shekohexandBohdan Triapitsyn 1d8ff97c95 feat(ui): add dynamic window title and sprite-based project/file icons (#529)
* feat(ui): add dynamic titles and sprite-based project/file icons

* feat(files): add viewer syntax fallback and tab file icons

* fix(files): restore file viewer highlighting and add diff file icons

* feat(git): add file icons and async file-viewer syntax fallback

* fix(files): force codemirror token colors in file viewer

* feat(files): add shiki view mode for file viewer

* fix(files): force codemirror parse after programmatic content updates

* feat(files): support markdown frontmatter preview

* feat(chat): use pierre diffs for tool previews

* feat(chat): add configurable beautiful-mermaid rendering

* feat(perf): virtualize chat rendering and add react-scan toggle

* feat(build): enable React Compiler in Vite React apps

* fix(chat): reduce rerenders from tooltips and streamed activity

* fix(ui): make MessageList React Compiler safe

* chore(ui): batch commit remaining pending ui updates

* fix: polish chat and diff preview rendering

- Keep Mermaid action buttons fixed while diagram content scrolls
- Align Diff All Files headers and match Git-style path truncation
- Default chat tool diffs to unified view with lightweight indicators disabled

* fix: preserve file tree expansion and delay git action label collapse

* fix: refine project icon controls in settings

---------

Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
2026-02-27 20:03:42 +02:00
Nelson Pires d6b8f28e6f refactor(skills-catalog): formalize module entrypoint and consolidate server imports (#537)
* refactor(skills-catalog): add module entrypoint exports

* refactor(web): use skills-catalog module entrypoint import

* docs(skills-catalog): add module documentation

* docs(agents): add skills-catalog docs map entry
2026-02-27 14:40:43 +02:00
Jovines 17734a6c65 fix(notification): cache parentID from session events to fix subtask notification detection (#530) 2026-02-27 09:32:20 +02:00
shekohexandBohdan Triapitsyn 27321d454b feat(remote): add desktop SSH remote instances lifecycle and UX (#515)
* feat(remote): add desktop SSH remote instances lifecycle and settings UX

* fix(remote): cancel SSH modal connect and correct desktop runtime detection

* fix(remote): unblock ssh auth flow and disconnect on instance removal

* fix(remote-ssh): harden remote lifecycle, auth probing, and port forwarding reliability

Improve SSH remote stability by correctly handling authenticated external probes, accepting ControlMaster handoff behavior, making reconnect detection tunnel-aware, and applying extra forwards through the shared master connection with local listener validation.

---------

Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
2026-02-26 20:26:12 +02:00
JovinesandJovines 5250a20578 fix(mobile): optimize usage rate limits tabs UI for mobile (#522)
Replace AnimatedTabs with lightweight text toggle in mobile usage view
to improve visual hierarchy between navigation tabs and filter options.
The new design uses text buttons with underline indicator instead of
card-style tabs, making the two tab levels more distinguishable.

Co-authored-by: Jovines <jovines@qq.com>
2026-02-26 20:22:41 +02:00
marco mereuandClaude Opus 4.6 dc0f9b3e62 Fix Windows compatibility: git status check, OpenCode spawn, path normalization, session merge (#527)
- Add isGitRepository check before getStatus() to prevent noisy errors on non-git directories
- Resolve npm shell wrapper shims on Windows so Bun can spawn OpenCode via node interpreter
- Add Win32PathFix middleware to normalize forward slashes to backslashes in directory params
- Merge sessions from all project directories on bare GET /session for Windows path compat

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 20:21:31 +02:00
nzlov 6ca2b0da05 feat(container): add Docker deployment and terminal shell fallback (#520)
* feat(container): add Docker deployment and terminal shell fallback

Add Docker runtime assets (Dockerfile, compose file, and entrypoint) to run OpenChamber in containers with persistent config/data mounts.

Improve terminal PTY startup reliability by probing multiple shell candidates and falling back automatically across Unix and Windows environments.

* fix: add OMO install env

* docs: add Docker Compose instructions to README
2026-02-26 20:13:23 +02:00
JovinesandJovines 0e9b231fed fix(mobile): restore original MobileAgentButton using onPointerUp instead of onClick (#524)
The original design used onPointerUp to cycle agents, which doesn't trigger
focus transfer and keeps the soft keyboard open. Recent changes switched to
onClick which causes button to gain focus and closes the keyboard.

- Remove onClick handler entirely
- Restore handlePointerDown, handlePointerUp, handlePointerLeave handlers
- Use onPointerUp to trigger agent cycling
- Add onContextMenu to prevent context menu on long-press
- Add extensive comments explaining why pointer events must be used

This reverts to the behavior from commit 337c458f where clicking the agent
button doesn't close the soft keyboard.

Co-authored-by: Jovines <jovines@qq.com>
2026-02-26 20:12:29 +02:00
JovinesandJovines 32619e9f90 feat(mobile): add child session indicators to current session in MobileSessionStatusBar (#525)
- Add childIndicators prop to SessionStatusHeader component
- Display up to 3 running child sessions with their agent colors
- Show extra count (+n) when there are more than 3 child sessions
- Align visual style with non-selected session items (using brackets [])
- Pass childIndicators through CollapsedView and ExpandedView components
- Extract child indicators from current session's processed status

Co-authored-by: Jovines <jovines@qq.com>
2026-02-26 20:08:42 +02:00
JovinesandJovines 26b95e2bd9 fix(mobile): improve branch selection dropdown interaction in merge dialog (#526)
- Add modal={false} to DropdownMenu to prevent drawer closing when
dismissing branch selector without selecting
- Remove auto-focus on search input to prevent unwanted keyboard popup
when opening branch selector on mobile

Co-authored-by: Jovines <jovines@qq.com>
2026-02-26 20:08:08 +02:00
nzlov 1b64c826ee feat: add MiniMax coding plan quota providers (#516)
Add separate MiniMax quota providers for minimax.io and minimaxi.com
Register and export both MiniMax providers in the web quota dispatcher
Update UI quota provider types/list and quota module documentation
2026-02-26 11:36:30 +02:00
Raph 2fc849bfa5 fix(ui): improve file mention autocomplete display for long filenames (#519)
- Increased max-width of the autocomplete container from 520px to 640px.
- Updated truncatePathMiddle maxLength from 45 to 60 for better visibility.
- Added a fade-out mask to the marquee container to prevent abrupt clipping.
2026-02-26 11:21:32 +02:00
Jovines f372294800 fix(mobile): expand clickable area for session status bar collapse (#517) 2026-02-26 10:37:24 +02:00
Bohdan Triapitsyn 25ee06dae9 Fix queued send for inactive sessions (#513) 2026-02-26 00:29:13 +02:00
Nguyễn Ngô ThượngandBohdan Triapitsyn 9a2af4c4d9 feat(nav-rail): add expand/collapse toggle with project names and settings control (#511)
* feat(nav-rail): add expand/collapse toggle with project names and settings control

The NavRail introduced in v1.7.5 only shows project icons without names,
making it difficult to identify which project is active when multiple
projects share similar icons or use letter avatars.

Changes:
- Add expandable NavRail that shows full project names alongside icons
- Default to expanded when multiple projects are open
- Auto-collapse to icon-only mode with a single project (nothing to differentiate)
- Add toggle button at bottom of rail with Cmd+Shift+E keyboard shortcut
- Highlight active project with interactive.selection background for clarity
- Show keyboard shortcut hints in tooltip and expanded label
- Add 'Expand project rail' checkbox in Settings > Appearance > Navigation
- Persist expansion state across sessions

Fixes: NavRail project icons are ambiguous without visible project names

* feat: improve nav rail toggle and navigation settings

- Make nav rail collapsed by default with smoother text fade behavior
- Move nav rail and terminal quick keys controls into a dedicated Navigation section
- Update keyboard shortcuts for logs/status and nav rail expand/collapse

---------

Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
2026-02-26 00:11:08 +02:00
Bohdan Triapitsyn a59bf010bb release v1.7.5 2026-02-25 19:55:27 +02:00
Bohdan Triapitsyn a1bd2bbab8 fix: make in-app web updates apply reliably in containers 2026-02-25 19:53:20 +02:00
Bohdan Triapitsyn bb95c3e3bf style: reduce top padding in project nav rail 2026-02-25 19:45:22 +02:00
Colin MollenhourandCopilot e02002bc9f feat(server): add OPENCODE_HOST env var for external OpenCode connections (#499)
* feat(server): add OPENCODE_HOST env var for external OpenCode connections

Allows specifying a full base URL (e.g. https://hostname:4096) for external
OpenCode connections, supporting custom hostnames and HTTPS. When set,
OPENCODE_HOST overrides OPENCODE_PORT. Malformed values are fatal at startup.

* docs: document OPENCODE_HOST env var in README and AGENTS

* Fatal error when OPENCODE_HOST has path, search or hash

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Colin Mollenhour <colin@mollenhour.com>

* fix(server): use external origin when re-probing OpenCode

---------

Signed-off-by: Colin Mollenhour <colin@mollenhour.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-25 19:42:32 +02:00
JovinesandJovines 7a151290be refactor(auth): migrate session storage to JWT with persistent secret (#508)
- Replace in-memory session Map with stateless JWT tokens
- Add jose library for JWT signing and verification
- Implement persistent JWT secret storage in ~/.config/openchamber
- Support OPENCODE_JWT_SECRET environment variable override
- Update SessionAuthGate and useServerSessionStatus hooks
- Remove session cleanup timer (JWTs are stateless)

Co-authored-by: Jovines <jovines@qq.com>
2026-02-25 19:40:28 +02:00
Bohdan Triapitsyn 5473381720 fix: prevent chat messages from duplicating or disappearing (#507)
- Tighten message deduplication and turn-structure checks in chat rendering
- Avoid stale cached turn grouping data during streaming and incremental updates
- Keep message order stable so headers and grouped messages render consistently
2026-02-25 15:20:38 +02:00
Bohdan Triapitsyn 10851bd7ac feat: move projects to sidebar rail and speed up session switching (#506)
* feat: move projects from header tabs to left sidebar rail

* refactor: remove variant from git generation session context

* feat: implemented drandrop action for navrails

* refactor: improve sidebar drag-and-drop smoothness and remove floating overlay

* fix: prevent mobile nav rail touch from closing drawer and opening menu

* fix: hide header tabs on desktop

* fix: prevent session flicker when switching projects

* style: soften chat panel divider borders

* style: improve icon contrast across core navigation

* fix: stabilize session selection during project switching

* style: unify sidebar surfaces and transparent section layers

* style: remove UI shadows and keep only scroll shadow

* perf: speed up project switching with cached session loading

* perf: speed up Git changes view and background refresh

* perf: make session switching lighter and less aggressive

* perf: optimized sessions list loading while project switching

* perf: smooth chat rendering and reduce interaction spikes

* fix: restore reliable load older messages visibility
2026-02-25 14:32:23 +02:00
Nelson Pires 4c69bccf56 fix(mobile): recover pending permission prompts after reconnect and resume (#497) 2026-02-24 20:15:19 +02:00
fc06a9c499 fix(chat): reduce user message padding and hide top scroll shadow on mobile (#496)
* fix(chat): reduce user message padding on mobile

* fix(mobile): limit drawer swipe gesture to status bar only

* fix(chat): hide top scroll shadow on mobile

* fix: add mobile edge-swipe drawer fallback and normalize comments

- Adds narrow left/right mobile edge swipe zones for drawer gestures
- Keeps drawer swipe access even when the mobile status bar is hidden
- Replaces remaining non-English comments in touched chat/layout files

* fix: remove edge swipe settings and tighten mobile chat spacing

---------

Co-authored-by: Jovines <jovines@qq.com>
Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
2026-02-24 17:38:12 +02:00
Bohdan Triapitsyn c4f6697ee1 release v1.7.4 2026-02-24 16:32:51 +02:00
Bohdan Triapitsyn 2f3209bd65 refactor: move summarization model settings to notifications
- Remove Utility Model controls from Session Defaults and restore that section’s original scope.
- Add Zen-based Summarization Model selector to Notifications under AI Summarization.
- Keep config resolution aligned with zenModel-only utility behavior in useConfigStore and git API flow.
2026-02-24 16:19:39 +02:00
Bohdan Triapitsyn 100d6d33a1 feat: show structured output value in tool description 2026-02-24 15:53:19 +02:00
Bohdan Triapitsyn 4a8c69e36a refactor: move git generation to session structured output
- Use active session prompts for commit/PR generation and drop backend git generation routes.
- Improve tool activity UX with Structured Output rendering, description styling tweaks, and detailed-mode expansion fixes.
2026-02-24 15:37:35 +02:00
Bohdan Triapitsyn 9462ac8498 feat: add usage display mode options to settings update 2026-02-24 13:33:23 +02:00
Bohdan Triapitsyn 69c5bbf99a fix(vscode): wire native notifications from runtime events 2026-02-24 13:18:48 +02:00
Nguyễn Ngô ThượngandBohdan Triapitsyn 5ab9b1a96e perf(streaming): buffer SSE parts via rAF to coalesce re-renders (#487)
* perf(streaming): buffer SSE parts via rAF to coalesce re-renders

addStreamingPart previously called _addStreamingPartImmediate directly
for every SSE token (~50-100/sec during streaming), causing one Zustand
set() and potential re-render per token.

Now incoming parts are buffered in a module-level queue and flushed once
per animation frame. React 18's automatic batching coalesces the
synchronous set() calls within the rAF callback into a single paint.

Also handles edge cases:
- completeStreamingMessage flushes pending queue before completing
- abortCurrentOperation discards queued parts for the aborted session
- cancelAnimationFrame prevents stale flushes on abort/complete

* perf(streaming): add timeout-backed flush for rAF queue batching

---------

Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
2026-02-24 12:07:05 +02:00
25d616f009 feat(mobile): refactor drawer system and session status bar (#494)
* feat(mobile): refactor drawer system with swipe gestures and improved status bar

- Add DrawerContext for centralized drawer state management
- Implement swipe gesture support for left/right drawers
- Refactor MobileSessionStatusBar with token usage indicator
- Update Header component with drawer toggle props
- Improve RightSidebar touch handling
- Add mobile-specific styling improvements
- Update UI store for drawer state management

* feat(mobile): update empty session hint text to clarify swipe gesture area

* fix(mobile): restore MobileAgentButton tap-to-cycle and long-press behavior

- Revert removal of tap-to-cycle agent switching functionality
- Re-add onCycleAgent prop and long-press detection (500ms)
- Click now cycles through primary agents, long-press opens selector panel
- Fixes regression from commit 569cc411

* feat(mobile): add project switcher bar and fix button interactions

- Add ProjectBar component to MobileSessionStatusBar for quick project switching
- Add useProjectStatus hook to track project-level session indicators
- Integrate project store with directory store for project management
- Add project status indicators (running/unread) to session status bar
- Fix MobileAgentButton pointer event handling with preventDefault
- Support horizontal scroll in project bar with touch gesture isolation

* feat(mobile): add long-press to remove projects and filter sessions by project

* fix: improve mobile agent switching UX

* fix: move drawer swipe hook to dedicated file

* refactor(mobile): simplify session status bar, remove More/Less toggle button

* fix: git diff navigation on mobile in sidebar mode

* feat(mobile): add configurable status bar and refine mobile chat controls

---------

Co-authored-by: Jovines <jovines@qq.com>
Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
2026-02-24 11:44:43 +02:00
Nelson PiresandBohdan Triapitsyn 7a11867a19 Unify utility model settings and align git generation (#486)
* refactor(api): extend git generation payload types

* refactor(settings): add git provider model fields

* feat(config): persist git provider model defaults

* feat(git-api): send provider and model ids

* fix(git-api): forward generation options in runtime

* feat(git-view): use configured model for commit generation

* feat(git-view): pass configured model for PR generation

* feat(vscode): forward model selection in git bridge payload

* feat(vscode): align PR generation with session model flow

* feat(web): resolve and generate git text with provider model

* refactor(settings): unify utility model picker across providers

* chore(settings): rename sidebar item to utility model

* fix(git-model): validate and auto-heal stale utility selections

---------

Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
2026-02-24 10:23:57 +02:00
Iuliia Ivashko 8647e0c1a4 fix(vscode): align fs read/raw endpoint security with web runtime (#491)
Route /api/fs/read and /api/fs/raw through the extension bridge with workspace-boundary enforcement and canonical path checks, so VS Code parity matches hardened web endpoint behavior.
2026-02-24 03:29:25 +02:00
Iuliia Ivashko de99b55a14 fix(chat): persist default thinking variant selection (#492)
Treat selecting Default as an explicit variant clear across send-time persistence, stream metadata sync, and historical session analysis so stale non-default variants are not reapplied.
2026-02-24 03:29:01 +02:00
Bohdan Triapitsyn d2358c2c03 feat: redesign settings pages to match canonical flat UI patterns (#493)
* refactor(settings): new IA shell + projects section + skills catalog discoverability

* chore(settings): split providers list by scope; show user before project

* fix: navigation flow in mobile Settings

* feat: redesign settings pages to use modern elevated surface patterns

* feat: replace helper text with tooltips in settings

* ui: redesign update dialog and fix external link routing

- Restructures UpdateDialog to focus on changelog readability with a wider max-w-4xl canvas
- Highlights @username contributor mentions with theme primary color
- Strips excessive vertical padding and right-aligns compact action buttons
- Disables streamdown's internal link safety dialog in favor of direct Tauri shell routing

* feat: refactor Git identities into dedicated Git settings page

* feat: unify sidebar background styling across VS Code and web/mobile

* fix: adjust button styling and layout for mobile settings pages

* feat: add MCP settings page and sidebar

* feat: hide models in provider view (thanks to @nguyenngothuong)

* feat: add "Add new provider" option to model selector dropdown

* fix: local evroc logo + provider dropdown icons

* fix: increase width of provider menu

* fix: dark theme background color for better contrast

* feat: update @opencode-ai/sdk dependency to v1.2.10

* fix: restore session sorting to only use updated time

* fix: added settings for sessions deletion dialog

* fix: adjust padding on settings pages for better layout

* fix: standardize select dropdown height across UI

* fix: agent selector UI and notification settings

* fix: remove redundant helper text from settings pages

* fix: update UI layout for description fields

* fix: remove border-none and shadow-none from textarea classes

* fix: enable context menu on sidebar items

* feat: refactor UI controls and layout patterns across settings pages

* fix: use headerless blocks when page title already provides context

* fix: remove subtask option from command settings

* fix: refactor mcp page settings

* fix: reduce spacing in skills configuration pages

* feat: refactor voice settings

* feat: refactor settings sidebar sections
2026-02-24 03:28:30 +02:00
Iuliia Ivashko d2d39c48ac feat(chat): add Mermaid fullscreen preview and harden file preview paths (#490)
* feat(chat): add mermaid preview popups and fullscreen diagram viewer

Enable opening Mermaid diagrams from markdown and file attachments with a dedicated fullscreen dialog, while tightening preview loading behavior and sizing for more reliable interaction.

* refactor(chat): extract shared preview overlay hooks

Centralize fullscreen preview transition and viewport lifecycle logic so image and Mermaid dialogs stay behaviorally aligned while reducing maintenance overhead.

* fix(security): enforce workspace boundaries for fs read endpoints

Validate /api/fs/read and /api/fs/raw paths against active workspace roots and canonical realpaths to block traversal and symlink escapes before serving file contents.

* fix(chat): remove dead Mermaid copy component

Drop an unused merge-leftover component in MarkdownRenderer to keep lint clean without changing Mermaid preview behavior.
2026-02-24 01:49:06 +02:00
Nguyễn Ngô ThượngandBohdan Triapitsyn b2101acfbf feat(settings): group agents and skills sidebar by subfolder (#464)
* feat(settings): group agents and skills by subfolder in sidebar

- Server: fix getUserAgentPath() to walk subfolders so grouped agent
  layouts (e.g. agents/business/ceo.md) are correctly resolved
- Store: add 'group' field to AgentWithExtras and DiscoveredSkill,
  parsed from file path at load time
- UI: add collapsible SidebarGroup component with localStorage-persisted
  expand/collapse state
- AgentsSidebar: render custom agents grouped by subfolder name
- SkillsSidebar: render project/user skills grouped by domain folder
- Ungrouped items (flat root) fall through and render normally

* fix(settings): normalize group paths and add agent lookup caching parity

---------

Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
2026-02-23 12:28:24 +02:00
Nguyễn Ngô ThượngandBohdan Triapitsyn 3cd6d051cb perf: fix streaming lag, memory leaks, stuck spinners, and proxy timeout (#483)
* perf: fix streaming lag, memory leaks, and proxy timeout

- PERF-001: Batch all streaming parts via requestAnimationFrame instead of
  per-token Zustand set() calls (~100/sec → 1 per frame)
- PERF-002: Fix direct state.sessionMemoryState mutation inside set() callback
- PERF-003: Debounce messageStore→sessionStore subscription via rAF + 500ms
  title computation delay
- PERF-004: Stabilize SSE callbacks with refs to prevent reconnection storms;
  add 5-min stuck session idle timeout
- PERF-005: Bound messageCache (500 max, LRU eviction), cap registry Maps,
  cleanup on session eviction
- PERF-006: Replace toast duration: Infinity with 30s + id-based dedup
- Fix proxy timeout: POST /session/:id/message 45s → 4min (matches CLI)
- Add vitest + jsdom test infrastructure (61 tests across 7 files)

Addresses: #476 (stuck spinner), #358 (34GB memory leak), #190 (browser lag)

* perf: virtualize tool output rendering (read, edit, write)

- PERF-007: Replace per-line <SyntaxHighlighter> with VirtualizedCodeBlock:
  - ONE Prism.highlight() call for entire file instead of N per-line calls
  - @tanstack/react-virtual renders only visible rows (~30 vs 2000+)
  - Applied to: ToolPart (read, DiffPreview, WriteInputPreview) and
    ToolOutputDialog (unified diff, read content)
- PERF-008: Memoize parseReadToolOutput/parseDiffToUnified via useMemo
  to prevent re-parsing on every re-render

A 2000-line file read now mounts ~30 DOM nodes instead of 2000
SyntaxHighlighter instances, eliminating the main-thread blocking
that caused UI freezes during file operations.

* fix: resolve lint errors (unused vars in tests and VirtualizedCodeBlock)

* chore: trim PR scope to core perf fixes

* fix: restore tool-card highlight stability

---------

Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
2026-02-23 12:05:53 +02:00
Nguyễn Ngô Thượng 989593ed72 feat(files): add 'Reveal in Finder' to file tree context menus (#482)
* feat(session-folders): drag-to-folder DnD, sort by activity, and UX improvements

- Add DraggableSessionRow wrapping each session row so the whole row is
  draggable; stopPropagation prevents outer group-reorder DnD from firing
- Add DroppableFolderWrapper + SessionFolderDndScope (inner DndContext
  scoped per group) with closestCenter collision detection
- DragOverlay matches exact width/height of dragged row so cursor stays
  aligned
- Folder header highlights (ring + primary colour) when a session hovers
  over it during drag
- + button on folder header opens a dropdown: 'New session' / 'New folder'
- + button on each folder row creates a session scoped to that folder
- Empty folders are no longer auto-deleted (removed .filter(sessionIds.length>0)
  from addSessionToFolder / removeSessionFromFolder / cleanupSessions)
- Sessions inside a folder are sorted by most-recent activity (same
  compareSessionsByPinnedAndTime logic used everywhere else)
- Sort comparator now takes sessionAttentionStates so lastUserMessageAt /
  lastStatusChangeAt is used when newer than session.time.updated; all
  sort call-sites and their useMemo/useCallback deps updated accordingly
- Remove foldersMap from cleanup effect deps to prevent cascade re-renders
  when folders change; read current value via getState() instead

* fix(session-folders): new session is placed into the correct folder

sendMessage() was calling useSessionManagementStore.createSession()
directly, bypassing the targetFolderId logic in useSessionStore.createSession.

Fix: read targetFolderId from draft at the top of the draft branch in
sendMessage, then call addSessionToFolder immediately after the session
is created and before the draft is closed. Also propagate targetFolderId
through openNewSessionDraft options and NewSessionDraftState type.

* feat(session-folders): add sub-folder support (one level deep)

- SessionFolder gains optional parentId field for hierarchy
- createFolder accepts parentId to create sub-folders
- deleteFolder cascades to remove all child sub-folders
- SessionFolderItem renders sub-folders before sessions in body;
  new sub-folder button (RiFolderAddLine) visible at depth 0 only
- renderOneFolderItem in SessionSidebar builds the tree recursively;
  sub-folders are indented via depth prop (ml-3 on root's children)
- Persist/hydrate parentId correctly from localStorage

* feat(session): add delete confirm dialogs and improve subtitle UX

- Add confirmation dialogs before deleting sessions or folders
- Show relative time (e.g., '2h ago', '35min ago') for recent sessions
- Replace +/- diff numbers with file change count (e.g., '3 files changed')
- New folders use default name without forcing rename
- Cleaner, less cluttered session list UI

* fix(session-folders): skip folder cleanup while sessions are loading

Prevents race condition on reload where cleanupSessions() runs before
the server returns the full session list, causing folder-session
assignments to be incorrectly wiped from localStorage.

* feat(files): add 'Reveal in Finder' to file tree context menus

Add a new context menu action to reveal files and folders in the system
file manager (Finder on macOS, Explorer on Windows, xdg-open on Linux).

- Add POST /api/fs/reveal server endpoint with cross-platform support
- Add revealPath() to FilesAPI interface and web implementation
- Add 'Reveal in Finder' menu item to SidebarFilesTree and FilesView
- Files are highlighted in Finder (open -R), folders are opened directly
2026-02-23 00:07:22 +02:00