Skip to content

feat: Grok ACP, History delete, folder icons, notifications, and UI polish#2385

Open
JOUYO wants to merge 14 commits into
getpaseo:mainfrom
JOUYO:contrib/all-local-improvements
Open

feat: Grok ACP, History delete, folder icons, notifications, and UI polish#2385
JOUYO wants to merge 14 commits into
getpaseo:mainfrom
JOUYO:contrib/all-local-improvements

Conversation

@JOUYO

@JOUYO JOUYO commented Jul 24, 2026

Copy link
Copy Markdown

Summary

Contribution branch on top of current main / 0.2.0. Every functional area below is intentionally spelled out so reviewers can map commits → behavior → tests.

Part Issue Key commits
Project folder icons #2399 977fac5f5
History Manage (client) #2400 b5bcf0364
Provider native session delete (server) #2401 c976febf5
Grok ACP + timeline cleanup #2402 ecb77565a, 66432da43, 543ee76fa
Cursor Ultra usage accuracy #2403 75078888b, b2cf7377d, af8c5047f
Context meters / lastUsage #2404 e736960d3
Browser notifications + terminal hooks #2404 6816488eb
Voice / Enter-to-send / theme boot #2404 105edadac
Composer + chat stream polish #2404 9d73ccea0, 543ee76fa
Remaining UI / runtime polish #2404 c863e97e2

Closes #2399
Closes #2400
Closes #2401
Closes #2402
Closes #2403
Closes #2404


1. Project folder icons (#2399)

Why: Letter-placeholder icons read as random initials and looked inconsistent across surfaces.

What changed:

  • ProjectIconView renders Lucide Folder / FolderOpen (via withUnistyles) when there is no custom iconDataUri
  • Supports optional expanded + iconSize
  • Call sites updated: sidebar workspace list, Projects screen, project settings, new-workspace picker, workspace setup dialog
  • Removed project-icon-color.ts and projectIconPlaceholderLabelFromDisplayName (+ tests)

Acceptance: projects without custom icons show folders everywhere above; custom iconDataUri still wins.


2. History Manage + hard-delete — client (#2400)

Why: History had no delete path; long-press sheets were rejected; users need explicit batch management of archived sessions only.

What changed:

  • History header Manage / Done toggles selection mode (no long-press)
  • AgentList selection mode: checkboxes; only archivedAt rows selectable; non-archived muted/disabled
  • Bottom bar: 全选 / 反选 + Delete (N) + confirmDialog
  • Helpers: agent-list-selection.ts, sessions-manage.ts (+ tests)
  • use-delete-agent waits for the matching agentId so cascade child deletes that share a requestId do not resolve early
  • i18n sessions.manage.* in all locales; unused archive-sheet copy removed
  • Outside Manage mode, normal click still opens the session

Acceptance: only archived selectable; select-all / invert / delete confirm work; Done exits manage mode.


3. Provider native session delete — server (#2401)

Why: Deleting only the Paseo record left provider history behind (Claude jsonl, Cursor/Grok dirs, etc.).

Flow (Session.deleteAgentFully):

  1. Load stored record (capture provider + persistence)
  2. Cascade-delete children via paseo.parent-agent-id
  3. Delete fence + close runtime + flush persistence
  4. Best-effort AgentClient.deleteNativeSession?
  5. Remove Paseo record + emit agent_deleted

Provider coverage:

Provider Native delete
Claude ~/.claude/projects/<encoded-cwd>/<sessionId>.jsonl + sidecar <sessionId>/
OpenCode session.delete RPC against running OpenCode server
Codex rollout JSONL via resolveCodexRolloutFile (file delete; no API)
Pi / OMP session file path from nativeHandle
All ACP capability-gated ACP session/delete via short-lived probe (ACPAgentClient.deleteNativeSession)
Grok (ACP) fallback also ~/.grok/sessions/<encodeURIComponent(cwd)>/<sessionId>/
Cursor (ACP) fallback also ~/.cursor/acp-sessions/<sessionId>/

Implementation notes:

  • ACP session/delete is stabilized in the protocol; SDK @0.17.1 has no typed deleteSession, so we call it via extMethod("session/delete", …) when sessionCapabilities.delete is advertised (COMPAT(acpSessionDelete))
  • Live probe of Cursor ACP: Method not found for session/delete → local-dir fallback required
  • Agents omitting sessionCapabilities.delete skip the protocol step (spec)
  • Soft vs hard delete is agent-defined; ACP only requires removal from future session/list
  • wrapClientProvider now forwards deleteNativeSession / archiveNativeSession / unarchiveNativeSession / shutdown so custom extends: "acp" providers are not silently skipped
  • Docs updated in docs/agent-lifecycle.md

4. Grok ACP + message envelopes (#2402)

Commits: ecb77565a, 66432da43, 543ee76fa

What changed:

  • First-class Grok ACP provider: modes, context usage, account email on provider cards
  • Cache-bypassing usage refresh + hardened Grok billing fetch retries
  • Timeline envelope normalization:
    • hide synthetic <system-reminder>, <user_info>, <git_status>
    • unwrap <user_query> / <spoken-input>
    • drop voice <instruction>
    • unwrap <workspace_result> tool output

Acceptance: Grok starts/streams; usage+email visible; synthetic envelopes do not appear as user bubbles.


5. Cursor Ultra usage accuracy (#2403)

Commits: 75078888b, b2cf7377d, af8c5047f

What changed:

  • Read Cursor plan usage from cursor-agent auth.json
  • Primary meter uses included spend, not total-with-bonus
  • Align Ultra included/API percentages with the Cursor dashboard (autoPercentUsed / apiPercentUsed)

Acceptance: dashboard numbers and in-app meter match for Ultra included + API buckets.


6. Context meters / lastUsage (part of #2404)

Commit: e736960d3

What changed:

  • Persist lastUsage on agent records (data-model + storage)
  • Harden Codex context usage (rollout tail fallback)
  • Harden Cursor context usage (session signals + model context window map)
  • Context-window meter utils/tests so reopened agents keep the ring

7. Browser notifications + terminal hooks (part of #2404)

Commit: 6816488eb

What changed:

  • Browser Notification API + paseo-notification-sw.js Service Worker
  • Settings → Diagnostics test notification
  • App diagnostic Notifications section (notification-diagnostic-report)
  • Suppress OS notifications only when the web app is both visible and focused
  • Register Cursor + Grok terminal agent hooks (docs + provider registry) for attention/status like Claude hooks
  • Broad i18n fill-in across ar / es / fr / ja / pt-BR / ru / zh-CN (notifications, diagnostics, schedules, sidebar, provider usage, add-project / new-workspace, tool-call display names)
  • Bi-axis code scroll for wide diffs/tool details; expandable badge state helper
  • Add Project: selecting an existing host project opens it instead of creating a duplicate
  • Show account email on provider usage cards

8. Voice / Enter-to-send / theme boot (part of #2404)

Commit: 105edadac

What changed:

  • Settings toggles for voice feature UI
  • Enter vs Shift+Enter to send (including mobile keyboard send)
  • Boot Unistyles/theme from persisted storage to stop web refresh color flash

9. Composer + chat stream polish (part of #2404)

Commits: 9d73ccea0, 543ee76fa

What changed:

  • Reuse the send control for stop while a turn is running
  • Float jump-to-bottom above the composer dock
  • Unify thinking / body / footer spacing and thinking markdown styles
  • Harden Grok usage fetch alongside composer stop path

10. Remaining UI / runtime polish (part of #2404)

Commit: c863e97e2 (large catch-up landing on 0.2.0)

Notable items in this commit (not exhaustive file list):

  • Workspace header / tabs: content-sized title+kebab (no large dead strip); tab icon/presentation cleanup; desktop tabs row polish
  • Sidebar: remove agent-list skeleton; workspace row content simplification; display-preferences / help menu hover+layout fixes
  • Loaders: synced-loader state cleanup; loading-spinner improvements
  • Git UI: commits-section simplification; PR panel skeleton cleanup; new pr-badge
  • Add Host: direct-draft helper + modal flow cleanup
  • Platform gating: split push-token + notification-open listeners into .web / .native
  • Theme/docs: Unistyles gotchas doc updates; markdown style adjustments; SECURITY.md note
  • Composer input / agent-controls utils polish; adaptive modal sheet; toast-host; tool-call sheet/details layout
  • Provider-usage tooltip/card cleanup; schedules i18n already covered above

Supersedes closed tracking issues / earlier forks:

Release-only commits from our fork (CHANGELOG / beta version cuts) are intentionally excluded.

Test plan

  • Projects without custom icons show folder icons in sidebar / Projects / setup flows
  • History → Manage: only archived rows selectable; 全选 / 反选 / Delete confirm works; Done exits manage mode
  • Deleting an archived Claude/Codex/OpenCode/Pi/OMP session removes the provider-native artifact (best-effort)
  • Deleting an archived Cursor/Grok ACP session removes the local session directory
  • Custom extends: "acp" providers that advertise sessionCapabilities.delete receive session/delete
  • Create a Grok ACP agent and confirm it starts, streams, and shows usage/context + account email
  • Confirm Grok synthetic envelopes do not appear as user bubbles; real prompts unwrap cleanly
  • Reopen a Codex/Cursor/Grok agent and confirm the context-window ring shows last-known usage
  • Cursor Ultra usage matches dashboard included/API percentages
  • Grant browser notification permission; test notification from Settings → Diagnostics; confirm no OS toast while focused+visible
  • Enable Cursor/Grok terminal hooks and confirm attention/status reporting
  • Toggle voice features + Enter-to-send; confirm theme no longer flashes on web refresh
  • Exercise composer stop-via-send, floating jump-to-bottom, and chat stream spacing on compact + wide layouts
  • Add Project: selecting an existing host project opens it instead of creating a duplicate
  • Workspace header has no large empty drag/dead strip before right-side controls
  • Wide diffs/tool details scroll on both axes without clipping

@greptile-apps

greptile-apps Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds Grok ACP support and usage reporting while expanding app settings and polishing composer, chat-stream, voice, and theme-startup behavior.

  • Registers Grok as an ACP provider with model metadata, launch options, context usage, and quota fetching.
  • Adds voice-feature, send-button, and Enter-key settings across app, protocol, client, and daemon configuration.
  • Introduces a floating composer dock, revised stream spacing, stop/send controls, and markdown rendering for user messages.
  • Synchronizes persisted themes before first paint and updates provider capability/configuration surfaces.

Confidence Score: 3/5

The composer dock’s theme-reactive Reanimated views can crash the native app during theme changes and should be corrected before merging.

Both main composer surfaces mount the new dock, whose Reanimated nodes are simultaneously managed by Unistyles for theme-dependent backgrounds, matching a documented native crash path.

packages/app/src/composer/dock.tsx

Important Files Changed

Filename Overview
packages/app/src/composer/dock.tsx Adds shared floating-composer positioning, but applies theme-reactive Unistyles styles to Reanimated views and can crash on native theme changes.
packages/server/src/server/agent/providers/grok-acp-agent.ts Adds Grok-specific ACP model transformation, launch arguments, modes, context usage, and persistence metadata without an identified blocking defect.
packages/server/src/services/quota-fetcher/providers/grok.ts Adds Grok authentication, billing retrieval, credential refresh, and bounded transient retries.
packages/protocol/src/messages.ts Extends mutable daemon configuration and browser automation schemas with coordinated client and server consumers.
packages/app/src/app/_layout.tsx Gates native rendering until settings resolve and applies theme and appearance updates before paint.
packages/app/src/composer/input/input.tsx Integrates configurable send-button visibility, Enter behavior, and running-turn stop behavior.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Settings[App settings] --> Client[Daemon client]
  Client --> Protocol[Protocol schemas]
  Protocol --> Config[Daemon config store]
  Config --> Speech[Speech runtime]
  Registry[Provider registry] --> Grok[Grok ACP provider]
  Grok --> Agent[Agent lifecycle]
  Grok --> Usage[Context and quota usage]
  Composer[Floating composer dock] --> Stream[Agent stream inset and controls]
Loading

Reviews (1): Last reviewed commit: "fix(app): align chat stream spacing and ..." | Re-trigger Greptile

Comment thread packages/app/src/composer/dock.tsx Outdated
Comment on lines +51 to +52
<Animated.View style={dockStyle} onLayout={onLayout}>
<Animated.View pointerEvents="none" style={fillStyle} />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Theme changes crash composer dock

When the native theme changes while the composer is mounted, these Reanimated views also receive theme-dependent Unistyles styles, causing both runtimes to mutate the same native nodes and triggering the documented Unable to find node on an unmounted component crash.

@greptile-apps

greptile-apps Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Too many files changed for review. (270 files found, 100 file limit)

Bypass the limit by tagging @greptile-apps to review.

@JOUYO JOUYO changed the title feat: Grok ACP, voice settings, and chat composer polish feat: Grok ACP, browser notifications, voice settings, and UI polish Jul 24, 2026
Hello and others added 7 commits July 24, 2026 21:47
Wire Grok as a first-class ACP provider with context usage from CLI
session signals, restore quota/auth/billing parsing for Settings usage,
and surface account email on provider usage cards (including Codex).

Co-authored-by: Cursor <cursoragent@cursor.com>
Let hosts disable dictation and voice mode with live speech teardown, and
hide composer controls from daemon config immediately. Add Enter send vs
newline (including mobile keyboard send) plus send-button visibility, and
boot Unistyles/theme from localStorage to stop the refresh color flash.

Co-authored-by: Cursor <cursoragent@cursor.com>
Stop the agent from the primary send control with a small white square
instead of a separate red button. Make usage refresh bypass the daemon
cache, and retry transient Grok billing network failures.

Co-authored-by: Cursor <cursoragent@cursor.com>
Port the local paseo chat polish: float the composer dock so the jump-to-bottom
control sits above it, unify Thinking/body/footer left edges and stream gaps,
and tighten markdown plus metadata icon sizing.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add web Notification/Service Worker support with diagnostics and focus-aware
suppression, tighten workspace header layout, localize remaining UI copy across
supported languages, and register Cursor/Grok terminal agent hooks.

Co-authored-by: Cursor <cursoragent@cursor.com>
Store last-known token usage on agent records so reopened sessions keep
the context ring, and fall back to Codex rollout / Cursor session data
when live usage notifications are missing.

Co-authored-by: Cursor <cursoragent@cursor.com>
Finish the local 0.2.0 migration by committing the remaining host/workspace
UI polish, notification platform splits, speech/config tweaks, protocol
helpers, and related docs so the working tree is clean on v0.2.0.

Co-authored-by: Cursor <cursoragent@cursor.com>
@JOUYO
JOUYO force-pushed the contrib/all-local-improvements branch from 3f243ea to c863e97 Compare July 24, 2026 14:00
Hello and others added 7 commits July 24, 2026 22:18
Hide synthetic system-reminder/user_info/git_status context, unwrap
user_query and spoken-input, strip voice instructions, and unwrap
workspace_result tool output so Grok timeline items match Claude-style
filtering.

Co-authored-by: Cursor <cursoragent@cursor.com>
Headless hosts only have ~/.config/cursor/auth.json from cursor-agent
login, not the desktop state.vscdb token. Without that fallback Cursor
stayed unavailable and was filtered out of the usage list.

Co-authored-by: Cursor <cursoragent@cursor.com>
Cursor totalSpend includes free bonusSpend, so the plan bar looked like
$492/$400. Use includedSpend against limit, expose total/API/Auto percent
windows, and list bonus usage as a detail.

Co-authored-by: Cursor <cursoragent@cursor.com>
Attribute the API dollar bar as limit × apiPercentUsed (e.g. 39.2% of
$400 → $156.80) and surface Total / First-party / API percent windows.
Raw includedSpend often pins at the cap while percentages still match
the Cursor dashboard; bonusSpend is free retail overage, not plan used.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace letter-placeholder project icons with Lucide Folder/FolderOpen so project rows stay visually consistent across sidebar, projects, and setup flows.

Co-authored-by: Cursor <cursoragent@cursor.com>
Let users batch-select archived History sessions (select all / invert) and permanently delete them. Active sessions stay non-selectable so delete cannot archive-by-accident.

Co-authored-by: Cursor <cursoragent@cursor.com>
Hard-delete now cascades children, then best-effort removes the provider's own session (Claude/Codex/OpenCode/Pi/OMP filesystem or RPC, ACP session/delete when advertised, plus Cursor/Grok local dirs). Also forward deleteNativeSession through wrapped provider clients.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment