Skip to content

fix: polish activity recents and browser ui#54

Merged
sasicodes merged 21 commits into
mainfrom
fix/subagent-count-label
May 31, 2026
Merged

fix: polish activity recents and browser ui#54
sasicodes merged 21 commits into
mainfrom
fix/subagent-count-label

Conversation

@sasicodes
Copy link
Copy Markdown
Owner

@sasicodes sasicodes commented May 30, 2026

Summary

Polishes the activity / thinking surface, sub-agent rendering, workspace dock, and the browser view, and simplifies the sub-agent runtime by removing hard limits.

Added

  • Sub-agent avatars inline on the activity row, and a dedicated ShimmerText component shared by the working label and running sub-agent names.
  • Workspace dock New Session button — shown only once a session has turns; on the empty new-session page the dock stays expanded, and it collapses to an icon-only pill during an active session.
  • Branch name in the workspace tooltipfolder (branch) for git repos, plain folder name otherwise.
  • Thinking headings — bold **title** lines in thinking are normalized into compact subheadings (thinkingMarkdown).
  • Browser zoom alignment — the native browser view is scaled by the renderer zoom factor and re-synced on zoom / visual-viewport / device-pixel-ratio changes, so it stays aligned when the app is zoomed.
  • Tests for detailMetric, thinkingMarkdown, subagentExpandable, subagentSummary, and browser bounds zoom scaling.

Changed

  • Compact markdown density tightened (smaller text, smaller paragraph/heading gaps) and section spacing made consistent across thinking, accordion content, and event lists.
  • Thinking headings now render subtle (soft color, medium weight) so event thoughts don't read like primary results.
  • Event chevron is hidden until row hover/focus (stays visible while expanded).
  • Event titles truncate to one line; metrics shrink to text-xs.
  • Recents and Settings controls gained tooltips; composer attachment corners realigned.

Removed

  • Repeated event count labels (×N) and sub-agent trailing metrics.
  • Sub-agent log list UI and the entire logs collection path (field, per-event push, IPC copy, schema) — logs were never displayed.
  • Sub-agent summary truncation (was 4000 chars).
  • Sub-agent per-agent timeout (was 10 min), max concurrent (was 4), and max tasks per spawn (was 8).
  • Error-specific text-danger styling on activity detail rows (errors now render in neutral event-list colors).

UX / behavioral changes

  • Sub-agents now run with no limits. All requested agents run concurrently, each as long as it needs, and a single subagent_spawn may request any number of tasks. There is no automatic timeout — a hung agent stays pending until the run is cancelled (cancellation still works via abort + session dispose).
  • Sub-agent rows stay static while running and expand only completed agents that returned a meaningful summary.
  • Full sub-agent summaries now feed back into the parent agent's context untrimmed.
  • The sub-agent prompt was tightened to ask for precise, in-scope output only (no preamble / restating the task).

Validation

  • pnpm check
  • pnpm --filter @start/desktop test (52 files, 290 tests)

@sasicodes sasicodes force-pushed the fix/subagent-count-label branch from bdd56d3 to 6c6fc09 Compare May 30, 2026 20:21
@sasicodes sasicodes changed the title fix: clean event labels fix: polish activity and recents ui May 30, 2026
@sasicodes sasicodes force-pushed the fix/subagent-count-label branch 4 times, most recently from 8ccb7c7 to 5224161 Compare May 30, 2026 20:28
@sasicodes sasicodes changed the title fix: polish activity and recents ui fix: polish activity recents and browser ui May 30, 2026
@sasicodes sasicodes force-pushed the fix/subagent-count-label branch 5 times, most recently from 7ffed4b to 99a20d0 Compare May 30, 2026 20:35
@sasicodes sasicodes force-pushed the fix/subagent-count-label branch from 99a20d0 to 5e465e3 Compare May 30, 2026 20:36
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 30, 2026

Greptile Summary

This PR polishes the activity / thinking surface and browser UI: it extracts ShimmerText, SubagentAvatars, and thinkingMarkdown helpers, tightens compact-markdown density, hides chevrons until hover, and adds zoom-aware browser-bounds scaling. Sub-agent runtime is simplified by removing the concurrency cap, per-agent timeout, task limit, and the logs collection.

  • Browser bounds are now scaled by the renderer zoom factor on the main-process side, with a pixel-ratio media-query listener that clears the renderer-side cache and forces a resend on zoom changes.
  • Sub-agent runtime now runs all agents concurrently via Promise.all(agents.map(runAgent)) with no cap; the logs field, log-push calls, and truncateSummary helper are removed throughout.
  • UI polishDetailItem gains a fade-in chevron, event titles truncate to one line with text-xs metrics, and sub-agent rows only become expandable when the completed agent returns a meaningful summary.

Confidence Score: 5/5

Safe to merge — changes are well-scoped UI polish with solid test coverage; the runtime simplification is intentional and documented.

The browser-bounds zoom fix is correct end-to-end: the renderer clears its cache on pixel-ratio change and the main process scales using the current zoom factor. Sub-agent runtime changes intentionally remove all limits (documented in the PR). The one edge case — session.dispose() throwing in the bare finally block surfacing a misleading error — is unlikely and non-data-loss. All other changes are UI-only with corresponding test coverage.

packages/desktop/src/main/subagents/runtime.ts — the bare session.dispose() in the finally block could produce a confusing error path, though it is unlikely to trigger in practice.

Important Files Changed

Filename Overview
packages/desktop/src/main/browser/index.ts Adds scaleBrowserBounds helper and stores scaled bounds in lastBounds; re-attachment path is correct since lastBounds is the final physical-pixel value.
packages/desktop/src/renderer/src/shared/browser/use-bounds.ts Adds matchMedia pixel-ratio listener chain and visualViewport events; clears lastBoundsRef before rescheduling on ratio change to force a fresh bounds send.
packages/desktop/src/main/subagents/runtime.ts Removes concurrency cap, timeout, and logs; switches to Promise.all over all agents. Bare session.dispose() in finally could surface a misleading error to the caller.
packages/desktop/src/renderer/src/shared/turn/subagents.tsx Removes log-list UI; sub-agent rows are static while running and only expandable with a meaningful completed summary; uses new ShimmerText for running state.
packages/desktop/src/renderer/src/shared/turn/detail.tsx Replaces detailCount with detailMetric, hides metric for sub-agent events, adds SubagentAvatars, switches to fade-in ChevronDown, removes error-specific text-danger color.
packages/desktop/src/renderer/src/shared/workspace/picker.tsx Adds collapsed prop to show icon-only pill when a session has turns, and shows branch name in tooltip label.
packages/desktop/src/renderer/src/shared/turn/thinking.ts New helper normalizing bold title lines in thinking blocks into ### headings and collapsing excess blank lines.
packages/desktop/src/renderer/src/shared/turn/shimmer.tsx New shared ShimmerText component extracted from the inline shimmer animation previously duplicated in subagents.tsx and working-label.tsx.

Sequence Diagram

sequenceDiagram
    participant R as Renderer (use-bounds)
    participant IPC as IPC Bridge
    participant M as Main (browser/index)
    participant V as WebContentsView

    R->>R: ResizeObserver / visualViewport resize
    R->>R: scheduleBounds() → syncBounds(cssPixelBounds)
    R->>IPC: browserBounds(cssPixelBounds)
    IPC->>M: setBrowserBounds(sender, cssPixelBounds)
    M->>M: scaleBrowserBounds(bounds, sender.getZoomFactor())
    M->>M: "lastBounds = scaledBounds"
    M->>V: view.setBounds(scaledBounds)

    Note over R: zoom/devicePixelRatio changes
    R->>R: handlePixelRatioChange()
    R->>R: "lastBoundsRef.current = null"
    R->>R: scheduleBounds() → forced resend
    R->>R: bindPixelRatioListener() re-register media query
    R->>IPC: browserBounds(cssPixelBounds)
    IPC->>M: setBrowserBounds(sender, cssPixelBounds)
    M->>M: scaleBrowserBounds(bounds, newZoomFactor)
    M->>V: view.setBounds(newScaledBounds)
Loading

Reviews (7): Last reviewed commit: "fix: use down chevron for event rows" | Re-trigger Greptile

Comment thread packages/desktop/src/renderer/src/shared/browser/use-bounds.ts
Comment thread packages/desktop/src/main/subagents/runtime.ts
@sasicodes sasicodes merged commit 3de9f6d into main May 31, 2026
4 checks passed
@sasicodes sasicodes deleted the fix/subagent-count-label branch May 31, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant