Skip to content

feat: improve horizontal overflow cues and off-screen task attention#52

Open
ASRagab wants to merge 4 commits intojohannesjo:mainfrom
ASRagab:task/feat-sidescrolling-2b86eb
Open

feat: improve horizontal overflow cues and off-screen task attention#52
ASRagab wants to merge 4 commits intojohannesjo:mainfrom
ASRagab:task/feat-sidescrolling-2b86eb

Conversation

@ASRagab
Copy link
Copy Markdown
Contributor

@ASRagab ASRagab commented Apr 3, 2026

Summary

This PR improves the usability of Parallel Code when many task slices are open side-by-side.

The key change in framing was that horizontal scrolling already existed; the real product gaps were:

  1. overflow discoverability — it was easy to miss that more slices existed off-screen
  2. off-screen observability — hidden agent/task slices could need attention without a strong signal in the sidebar

This PR addresses those gaps and also increases terminal scrollback for agent review/debugging.

What changed

1) Horizontal overflow affordance

  • adds passive left/right edge cues to the main tiling strip in src/components/TilingLayout.tsx
  • tuned the visual treatment in src/styles.css to use a narrow accent/caret-led cue rather than a heavy overlay
  • preserves the existing horizontal scrolling model instead of introducing custom scroll controls or a layout rewrite

2) Runtime-only viewport visibility for task slices

  • adds runtime-only task visibility state:
    • visible
    • offscreen-left
    • offscreen-right
  • publishes that state from the actual horizontal viewport in TilingLayout
  • intentionally does not persist viewport visibility

3) Additive task attention model

  • adds a separate attention model in src/store/taskStatus.ts without replacing the existing dot status model:
    • idle
    • active
    • needs_input
    • error
    • ready
  • keeps getTaskDotStatus() intact for backward compatibility

4) Better off-screen/background attention detection

  • extends throttled output analysis so background task agents can still surface meaningful attention state
  • fixes an important edge case where throttled background [Y/n] prompts could otherwise lose needs_input state

5) UI surfacing for off-screen attention

  • updates Sidebar and StatusDot so off-screen tasks can surface stronger attention cues
  • keeps the UI relatively quiet:
    • active off-screen tasks get visual emphasis
    • explicit text badges are reserved for stronger states like input/error
  • updates edge affordances so they can reflect off-screen attention directionally

6) Attention-aware desktop notifications

  • moves notification logic from coarse busy/waiting transitions toward richer attention transitions:
    • ready
    • needs_input
    • error
  • keeps debounce/deduping behavior

7) Longer terminal scrollback

  • increases xterm scrollback to 10_000 lines in both:
    • src/components/TerminalView.tsx
    • src/remote/AgentDetail.tsx
  • centralizes the shared value in src/lib/terminalConstants.ts

2026-04-03 00 49 36

Why this approach

  • does not rewrite the layout system
  • does not rewrite focus/navigation behavior
  • keeps viewport state runtime-only
  • prefers additive observability over broad architectural change
  • treats task-agent attention as the first pass, rather than trying to model every shell-specific state immediately

Notes on implementation details

  • viewport measurement uses actual DOM rects against the scroll container rather than brittle offset math
  • recompute triggers were tightened so reorder/structure changes do not leave stale off-screen state behind
  • the overflow cue went through a few iterations to land on a narrower, more natural accent/caret-led affordance that works better across themes

Validation

  • npm run typecheck
  • npm run lint
  • npx vitest run src/store/taskStatus.test.ts

All passed locally.

Files changed

  • src/components/Sidebar.tsx
  • src/components/StatusDot.tsx
  • src/components/TerminalView.tsx
  • src/components/TilingLayout.tsx
  • src/lib/terminalConstants.ts
  • src/remote/AgentDetail.tsx
  • src/store/core.ts
  • src/store/desktopNotifications.ts
  • src/store/store.ts
  • src/store/taskStatus.test.ts
  • src/store/taskStatus.ts
  • src/store/types.ts
  • src/store/ui.ts
  • src/styles.css

Commit structure

  • feat: add horizontal overflow affordance cues
  • feat: surface off-screen task attention
  • feat: increase terminal scrollback
  • chore: simplify sidebar attention cleanup

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