Commit Graph

190 Commits

Author SHA1 Message Date
Harsh Batheja 7e53542f9d feat: support multiple concurrent orchestrators with isolated worktrees (#870)
* feat: support multiple concurrent orchestrators with isolated worktrees

- Each orchestrator session gets a numbered ID ({prefix}-orchestrator-N)
  and an isolated git worktree, replacing the single shared orchestrator
- reserveNextOrchestratorIdentity atomically reserves the next available
  number and detects conflicting project prefix configurations early
- isOrchestratorSession / isOrchestratorSessionName accept optional
  allSessionPrefixes for cross-project false-positive prevention
- getProjectPause and resolveGlobalPause track the longest active pause
  across all concurrent orchestrators instead of returning the first found
- cleanupWorktreeAndMetadata helper used consistently on all failure paths
  including post-launch; system prompt file included in cleanup
- pollBacklog, status.ts, ProjectSidebar, sessions page, global-pause,
  project-utils, serialize, and sessions API route all pass
  allSessionPrefixes to isOrchestratorSession
- Web sessions/[id]/page.tsx fetches project prefix map and passes it
  through prefixByProjectRef to avoid stale closure in fetchProjectSessions

* fix: seed sseAttentionLevels from fresh sessions on full refresh

When scheduleRefresh dispatches a reset action, derive sseAttentionLevels
from the freshly fetched sessions using getAttentionLevel. This clears
phantom entries for removed sessions and seeds correct levels for new
sessions, preventing stale favicon color and attention counts until the
next SSE snapshot.

* fix: merge duplicate @/lib/types imports into single import statement

Combining the separate import type and value import from @/lib/types
into one import to satisfy the no-duplicate-imports lint rule.
2026-04-06 22:48:01 -07:00
harshitsinghbhandari f9d991d4fd fix: handle optional plugin field in CLI and web packages
Update all usages of project.tracker.plugin and project.scm.plugin
to use optional chaining since the plugin field is now optional
when package or path fields are specified.

Files updated:
- CLI: doctor.ts, status.ts, verify.ts
- Web: issues/route.ts, verify/route.ts, scm-webhooks.ts,
       serialize.ts, services.ts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-06 22:46:29 -07:00
Gaurav Bhola 87c661332e fix(web): restore local type defs in mux-websocket and add coverage tests
tsconfig.server.json sets rootDir:"server" so importing from
../src/lib/mux-protocol.ts violated the boundary and broke the CI
typecheck step. Reverted to local type definitions with a comment
linking to the canonical source.

Also adds tests to bring diff coverage above 80%:
- MuxProvider.test.tsx: 30 tests covering lifecycle, message handling,
  and all terminal operations (subscribeTerminal, write, open, close,
  resize, reconnect, cleanup)
- api-routes.test.ts: GET /api/sessions/patches coverage (success,
  field shape, project filter, error path)
- useSessionEvents.test.ts: mux-path tests (muxSessions snapshot
  dispatch, membership-change scheduleRefresh, mux-active SSE bypass,
  cleanup on unmount)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 22:46:29 -07:00
Gaurav Bhola 44acb6d1db fix(web): re-send terminal dimensions on mux reconnect
After a reconnect MuxProvider re-opens all terminals, but new PTYs spawn
at 80×24 default. DirectTerminal only sent the initial resize on mount.
Add a dedicated effect that fires whenever muxStatus transitions to
"connected": calls fit.fit() to measure the current container then sends
the live cols/rows to the server, keeping the PTY size in sync.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 22:46:29 -07:00
Gaurav Bhola 469382ccdc fix(web): remove muxStatus from fullscreen-resize effect deps
muxStatus was in the deps array solely for the guard check at the top of
the effect. This caused the entire RAF loop + transitionend + backup timers
to re-run on every mux status transition (e.g. reconnecting→connected),
even when no layout change occurred.

Fix: track muxStatus in a ref (updated on every render) and read the ref
inside the effect, so the guard always sees the current value without
muxStatus being a dependency.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 22:46:29 -07:00
Gaurav Bhola 3ae8c9d2bf fix(web): cap PTY re-attach attempts to prevent unbounded respawn loop
Add reattachAttempts counter to ManagedTerminal and MAX_REATTACH_ATTEMPTS
constant (3). The onExit handler only re-calls open() while the counter is
below the cap, resets it to 0 on a successful attach, and falls through to
notify exit callbacks once the limit is reached — preventing a crash-loop
where a PTY that exits immediately after spawn triggers infinite re-attaches.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 22:46:29 -07:00
Gaurav Bhola faa1bfa8d6 fix(web): isolate subscriber callbacks in pty.onData with try-catch
A throwing callback (e.g. ws.send on a closed socket) would abort the
for-of loop, causing remaining subscribers to miss the data chunk and
skipping the ring buffer update — corrupting replay history for future
reconnections. Wrapping each call in try-catch keeps all subscribers
independent and ensures the buffer update always runs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 22:46:29 -07:00
Gaurav Bhola 44ff40c0ca fix(web): remove duplicate cleanup from error handler
In the ws library, "error" is always followed by "close", so the close
handler's cleanup (clearInterval, unsubscribe sessions, unsubscribe all
terminals) was running twice. Reduced the error handler to just the
console.error log and let close handle cleanup exclusively.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 22:46:29 -07:00
Gaurav Bhola 5e39b55461 fix(web): import mux protocol types from shared file and guard error send
- Replace the duplicated ClientMessage/ServerMessage/SessionPatch local
  type definitions in mux-websocket.ts with a single import type from
  src/lib/mux-protocol.ts — eliminates the risk of the two copies drifting
  apart as the protocol evolves
- Add ws.readyState === WebSocket.OPEN guard to the ws.send call inside
  the terminal-operation catch block, consistent with all other sends in
  the file; prevents a throw that would bubble into the outer catch and
  replace the real error with a misleading "Invalid message format"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 22:46:29 -07:00
Gaurav Bhola a9ee9eac7b fix(web): fix abortController clobber, heartbeat off-by-one, and remove dead close()
- SessionBroadcaster.connect(): capture controller in a local variable and
  only clear this.abortController in finally if it still equals the local
  controller; prevents a concurrent connect() call's controller being
  nullified by an older connect()'s finally block
- Heartbeat: send ws.ping() before incrementing missedPongs so all
  MAX_MISSED_PONGS pings are actually transmitted before terminating
  (previously terminated after MAX_MISSED_PONGS-1 sent pings)
- Remove TerminalManager.close(): never called by the mux handler (which
  uses per-subscriber unsubscribe instead) and subtly broken — it killed
  the PTY without clearing subscribers, which would have triggered an
  immediate re-attach via onExit

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 22:46:29 -07:00
Gaurav Bhola 78e5712555 fix(web): prevent duplicate buffer replay on reconnect and remove stale terminals ref
- Move buffer send + subscribe inside !subscriptions.has(id) guard so
  reconnecting clients don't receive the history replay twice (once on
  first open, once after wsRef is reassigned on reconnect)
- Remove `terminals` field from MuxContextValue and useMemo — it was
  populated from a write-only ref and never consumed by any component

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 22:46:29 -07:00
Gaurav Bhola b04137f6bc fix(web): address eighth-pass bugbot review issues
- useSessionEvents: mux-active SSE cleanup now also resets
  pendingMembershipKeyRef and refreshingRef so the aborted fetch's
  .finally() handler cannot reschedule after unmount
- DirectTerminal: add distinct "Disconnected" label and error-coloured
  dot for muxStatus "disconnected" (WebSocket constructor failure with
  no reconnect), instead of the misleading "Connecting…" shown for
  transient states

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 22:46:29 -07:00
Gaurav Bhola 2da6906be8 fix(web): prevent SSE effect from re-running on every mux snapshot
The SSE effect had muxSessions (array reference) in its deps, causing
it to re-run on every snapshot and fire cleanup that cleared the
debounce timer the mux effect intentionally preserved.

- Derive muxActive = muxSessions !== undefined and use that in SSE
  effect deps — the effect now only re-runs when mux transitions
  between present/absent, not on every new array reference
- Add reschedule in scheduleRefresh .finally() abort path: when a
  fetch is aborted mid-flight (by a new snapshot) and there is still
  a pending membership key, reschedule so the refresh isn't silently
  dropped

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 22:46:29 -07:00
Gaurav Bhola c418f852e2 fix(web): address seventh-pass bugbot review issues
- MuxProvider: handle exited and error terminal messages — exited
  removes the terminal from openedTerminalsRef (preventing re-open on
  reconnect) and writes a red notice into the xterm stream; error is
  logged to console
- MuxProvider: remove dead buffersRef/bufferBytesRef — client-side
  ring buffer was never read; the server already delivers history on
  open
- mux-websocket: use ws.terminate() instead of ws.close() on heartbeat
  timeout — an unresponsive peer won't complete the close handshake,
  so terminate() immediately destroys the socket and frees resources

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 22:46:29 -07:00
Gaurav Bhola 1f9fd03066 fix(web): process empty muxSessions array to detect session removal
Removing the muxSessions.length === 0 guard so an empty snapshot
triggers the membership-key comparison and scheduleRefresh(), which
fetches the full session list and dispatches a reset. Previously,
[] caused an early return that left removed sessions visible indefinitely.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 22:46:29 -07:00
Gaurav Bhola 5e8b67ca27 fix(web): address sixth-pass bugbot review issues
- MuxProvider: reset isDestroyedRef to false at the start of the
  effect so React StrictMode's double-invoke doesn't permanently break
  the connection (cleanup sets it true, re-run must reset it)
- DirectTerminal: remove dead status state — it was only set to "error"
  in a catch block but never read; displayStatus already derives the
  error indicator from the error string directly

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 22:46:29 -07:00
Gaurav Bhola 926a235179 fix(web): address fifth-pass bugbot review issues
- mux-websocket: wire up the exited ServerMessage — add exitCallbacks
  to ManagedTerminal, pass onExit param through subscribe(), and fire
  callbacks when PTY exits and re-attach fails so clients get notified
- DirectTerminal: fix displayStatus to show "error" when there is a
  local error (e.g. xterm.js load failure) regardless of mux state
- useSessionEvents: SSE effect's mux early-return path now returns a
  cleanup function that clears refreshTimerRef and aborts in-flight
  requests on unmount, preventing post-unmount dispatch calls

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 22:46:29 -07:00
Gaurav Bhola 3eda33ea74 fix(web): address fourth-pass bugbot review issues
- DirectTerminal: remove stale muxStatus read from xterm setup effect
  (muxStatus was captured at mount, leaving reload button permanently
  disabled); reload button now checks muxStatus directly on each render
- TerminalManager: kill PTY and delete map entry when last subscriber
  unsubscribes, preventing orphaned node-pty processes when all mux
  clients disconnect

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 22:46:29 -07:00
Gaurav Bhola 1de9387465 fix(web): address third-pass bugbot review issues
- MuxProvider: assign wsRef.current immediately after construction so
  cleanup can close a WebSocket that is still in CONNECTING state;
  add isDestroyedRef to prevent the close handler from scheduling
  reconnects after the component unmounts
- mux-websocket: client "close" message now only unsubscribes that
  client — removed terminalManager.close() which killed the shared PTY
  for every other connected client
- useSessionEvents: mux effect cleanup no longer clears the debounce
  timer; only aborts in-flight requests, preventing rapid mux snapshots
  from starving the membership-change refresh

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 22:46:29 -07:00
Gaurav Bhola b9d21d1f18 fix(web): address bugbot review issues from second pass
- Replace Node.js Buffer.byteLength() with TextEncoder in MuxProvider
  (browser-safe UTF-8 byte counting for the ring buffer)
- Remove write-only sessionSubscribedRef from MuxProvider
- Remove dead DirectTerminalLocation, DirectTerminalWsUrlOptions,
  buildDirectTerminalWsUrl and their tests (superseded by mux)
- Call closeTerminal(sessionId) on DirectTerminal unmount so PTY
  processes are released and openedTerminalsRef stays accurate
- Add cleanup return to mux effect in useSessionEvents so pending
  refresh timers and abort controllers are cleared on unmount

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 22:46:29 -07:00
Gaurav Bhola f2986bf863 fix(web): address bugbot review — heartbeat, shutdown, runtime config, cleanup
- Use native WS ping frames for heartbeat so idle browser clients are not
  incorrectly disconnected (browser auto-responds to native ping with pong)
- Pass runtime config to buildMuxWsUrl() so dynamic port/proxy path set via
  TERMINAL_WS_PATH env var is actually used (was fetched but never consumed)
- Delay initial WS connect until runtime config fetch resolves, preventing
  race condition on first load
- shutdown() now terminates all mux clients and closes the WSS, preventing
  orphaned PTY processes on restart
- ws 'error' handler now unsubscribes terminal callbacks alongside session
  subscription to prevent leaks in edge cases where 'close' does not follow

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 22:46:29 -07:00
Gaurav Bhola 4684b75def feat(web): single-socket — multiplex terminals + sessions over one WebSocket
Replace three separate real-time channels (per-terminal WS, SSE, HTTP poll)
with a single persistent multiplexed WebSocket at /mux.

Architecture:
- Browser ↔ MuxProvider owns one WS connection per tab (/mux)
- Terminal I/O, resize, open/close all flow over mux channels
- Session status patches delivered via a shared SSE relay:
  mux server subscribes once to Next.js /api/events (SSE) and
  broadcasts to all connected browser clients — no per-client polling
- Manual WS upgrade routing fixes ws library limitation with multiple
  WebSocketServer instances on the same HTTP server

Remove:
- terminal-websocket.ts (legacy ttyd-based per-session server, port 14800)
- Per-terminal WebSocket connections from DirectTerminal
- Per-client 5 s HTTP polling for session patches

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 22:46:29 -07:00
Gaurav Bhola 82581fa040 refactor(web): migrate DirectTerminal to use multiplexed WebSocket
Replace direct WebSocket connections with mux channel subscriptions:
- Add useMux() hook to DirectTerminal component
- Replace WebSocket creation with openTerminal() call
- Use subscribeTerminal() for receiving terminal data
- Use writeTerminal() for sending user input
- Use resizeTerminal() for handling window resize
- Remove WebSocket reconnection logic (handled by MuxProvider)
- Remove runtime config fetching (handled by MuxProvider)
- Preserve all existing features:
  - XDA (Extended Device Attributes) handler for clipboard support
  - OSC 52 clipboard handler
  - Keyboard copy handler (Cmd+C/Ctrl+Shift+C)
  - Selection buffering during output
  - Theme switching
  - Fullscreen mode
  - Resize handling

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 22:46:29 -07:00
Gaurav Bhola 9458c83849 feat(web): add MuxProvider React context for persistent WebSocket
Implements client-side multiplexed WebSocket context:
- Create MuxProvider component with persistent connection management
- Implement exponential backoff reconnection (1s to 30s)
- Add subscribeTerminal/writeTerminal/resizeTerminal/openTerminal methods
- Manage per-terminal ring buffers (50KB max) for background output
- Track session patches from server
- Create useMux() hook for easy access in components
- Mount MuxProvider in app root layout via Providers wrapper
- Support dynamic runtime config from /api/runtime/terminal

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 22:46:29 -07:00
Gaurav Bhola 2e5ee30fcf feat(web): add multiplexed WebSocket protocol and mux server
Implements backend multiplexed WebSocket server on /mux endpoint:
- Add mux-protocol.ts with ClientMessage and ServerMessage types
- Create TerminalManager class for managing PTY processes independently
- Implement mux-websocket.ts with attachMuxWebSocket() function
- Wire mux server into existing direct-terminal-ws server
- Support multiple terminals over single persistent WebSocket connection
- Implement 50KB ring buffer for background terminal output
- Add heartbeat and reconnection logic

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 22:46:29 -07:00
Harsh Batheja 8625137702 feat: event-driven live tab titles and favicons via SSE (#848)
* feat: event-driven live tab titles and favicons via SSE

Switch tab titles and favicons from polling to real-time SSE updates:

- Extend useSessionEvents to expose sseAttentionLevels map from SSE
  snapshots (server-computed, includes full PR state)
- Refactor DynamicFavicon to use SSE attention levels instead of
  recomputing from the full sessions array (which has stale PR data
  between refreshes)
- Add useSSESessionActivity hook for session detail page to update
  document.title emoji immediately on activity change
- Add live dashboard title showing count of sessions needing attention
- Update PullRequestsPage to use new DynamicFavicon API

Closes #115

* fix: seed initial attention levels to avoid stale favicon/title on first render

Accept initialAttentionLevels parameter in useSessionEvents so callers
can seed the attention map from initialSessions via getAttentionLevel().
This prevents the favicon and dashboard title from briefly showing
"all clear" before the first SSE snapshot arrives.

* fix: add EventSource mock to session page test for SSE hook compatibility

* fix: reset stale activity state when sessionId changes in useSSESessionActivity

Add sessionId to the effect dependency array and reset state to null at
the start of each effect run so callers that reuse the hook with a
different sessionId don't see the previous session's activity.

* fix: reset sseAttentionLevels on initialSessions change to prevent stale data on project switch

The reset action now accepts an optional sseAttentionLevels field. When
initialSessions changes (e.g., project switch via sidebar), the dispatch
passes the current initialAttentionLevels via ref so the favicon and
dashboard title reflect the new project immediately rather than showing
stale attention data until the first SSE snapshot.
2026-04-06 22:46:29 -07:00
Tanuu 95ca1c1e21 fix: return 400 for invalid verify API payloads 2026-04-06 22:46:29 -07:00
Harsh Batheja 53ef778357
feat: add CI failure detail notifications in lifecycle manager (#850)
* feat: add CI failure detail notifications in lifecycle manager

When CI fails on a PR, the lifecycle manager now fetches individual check
details (names, statuses, URLs) and sends them to the worker session.
This complements the existing static reaction message with actionable
debugging information.

Flow:
- On first transition to ci_failed: static reaction message fires (existing)
- On next poll: detailed CI failure info with check names and URLs dispatched
- Fingerprinting prevents re-sending the same failure set
- New/changed failures trigger fresh detailed notifications
- Tracking metadata cleared when PR is merged/closed or CI passes

Follows the same deduplication pattern as maybeDispatchReviewBacklog().

* fix: send CI details directly to avoid consuming reaction retry budget

The detailed CI failure dispatch now uses sessionManager.send() directly
instead of executeReaction(), so it doesn't increment the ci-failed
reaction tracker. This prevents low retries/escalateAfter settings from
causing premature escalation before the agent receives failure details.

The transition reaction still owns escalation; the detailed dispatch is
purely informational follow-up delivery.

* feat: add merge conflict notifications in lifecycle manager

Adds maybeDispatchMergeConflicts() that detects merge conflicts from
the PR enrichment cache or getMergeability() and notifies the worker
session. Conflicts are dispatched independently of session status since
they can coexist with ci_failed, changes_requested, etc.

- Uses the existing merge-conflicts reaction config
- Dispatches once per conflict occurrence (tracks lastMergeConflictDispatched)
- Clears tracking when conflicts resolve, allowing re-dispatch if they recur
- Sends directly via sessionManager.send() (same pattern as CI details)

* fix: use CICheck type instead of inline type declaration

Replace inline Array<{ name, status, url, conclusion }> with the
existing CICheck type from ./types.js for formatCIFailureMessage and
the checks variable in maybeDispatchCIFailureDetails.

* fix: resolve no-useless-assignment lint error in merge conflict check

Declare hasConflicts without initial value since both branches of the
if/else assign to it before it's read.

* feat: show agent notification state in session page blockers

The blockers section on both SessionDetail (IssuesList) and SessionCard
(alert pills) now shows whether the agent has been notified about each
blocker. Reads lifecycle manager dispatch metadata:
- lastCIFailureDispatchHash for CI failures
- lastMergeConflictDispatched for merge conflicts
- lastPendingReviewDispatchHash for review comments

Displays "agent notified" indicator next to blockers where the lifecycle
manager has already forwarded the issue to the worker session.

* fix: use lifecycle status as fallback for blockers when PR data is stale

The blockers section now uses the lifecycle manager's session status
metadata as a source of truth when PR enrichment data hasn't caught up.
PR enrichment uses a 5-min cache and can timeout or be rate-limited,
causing blockers to show stale/incorrect state.

Changes:
- IssuesList and getAlerts now check metadata["status"] (lifecycle
  manager state) alongside PR enrichment data
- CI failing: shown when pr.ciStatus is "failing" OR lifecycle status
  is "ci_failed"
- Changes requested: shown when pr.reviewDecision matches OR lifecycle
  status is "changes_requested"
- Merge conflicts: shown when pr.mergeability.noConflicts is false OR
  lifecycle dispatch metadata indicates conflicts were detected

* fix: fall back to getMergeability when cached hasConflicts is undefined

When PREnrichmentData has hasConflicts as undefined (the field is typed
as boolean | undefined), the previous check treated it as no conflicts.
Now falls through to the getMergeability() call instead.

* test: add coverage for CI/conflict notify action and recovery paths

- Test CI tracking clears when CI recovers to passing
- Test notify action for CI failure details (human notification path)
- Test notify action for merge conflicts (human notification path)

These cover the previously uncovered notify action branches and the
CI recovery cleanup path in the lifecycle manager.

* fix: resolve typecheck error in CI recovery test

writeMetadata requires SessionMetadata type which doesn't include
custom keys like lastCIFailureFingerprint. Rewrote the test to use
setupCheck and let the lifecycle manager set tracking metadata
naturally through the CI failure flow, then verify cleanup on recovery.

* fix: don't use dispatch metadata for conflict detection in UI

lastMergeConflictDispatched lingers after conflicts resolve until the
lifecycle manager's next poll clears it. Using it as a conflict signal
caused stale "merge conflict" alerts. Now only pr.mergeability.noConflicts
drives conflict detection; the metadata is only used for the "agent
notified" badge.

* fix: use Promise.allSettled for dispatch functions to avoid orphaned rejections

Promise.all rejects immediately on first failure, leaving in-flight
promises unmonitored. Promise.allSettled waits for all to complete.
2026-04-02 11:23:08 +05:30
Ashish Huddar eb5bc34ff7 Stabilize SessionCard quick reply test 2026-04-01 20:19:57 +05:30
Ashish Huddar e1d0a04b09 Fix lint error in terminal test 2026-04-01 20:13:17 +05:30
Ashish Huddar b749ab3e50 Add coverage for terminal UI changes 2026-04-01 19:52:55 +05:30
Ashish Huddar 108dd7aa50 Address terminal theme review comments 2026-04-01 19:43:35 +05:30
Ashish Huddar 9470befabf Fix DirectTerminal theme test 2026-04-01 19:29:10 +05:30
Ashish Huddar a4e8c7f360 Merge remote-tracking branch 'origin/main' into ashish921998/design-sync-pr 2026-04-01 18:52:11 +05:30
fireddd e6c3a06427 ci: add diff coverage workflow enforcing 80% on changed code only
Uses diff-cover to check that newly added or modified lines in PRs
have at least 80% test coverage, without requiring the entire
codebase to meet the threshold.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 09:26:36 +05:30
Dhruv Sharma b611222d87
Merge pull request #730 from ruskaruma/fix/parallel-pr-enrichment
perf(web): parallelize PR enrichment in GET /api/sessions
2026-03-30 14:30:54 +05:30
github-actions[bot] d1e937b855 chore: version packages 2026-03-29 09:21:26 +00:00
suraj_markup f73aebe634
Merge pull request #761 from suraj-markup/fix-runtime-terminal-projectid-hardening
fix(web): runtime terminal port resolution + project-id hardening
2026-03-29 14:50:25 +05:30
Ashish Huddar ce4927543a Align web UI to design system 2026-03-29 09:23:17 +05:30
suraj-markup f82e4e6ad9 fix(test): replace dynamic delete with Reflect.deleteProperty in withEnv
Fixes @typescript-eslint/no-dynamic-delete lint error in api-routes.test.ts
which was breaking Lint, Typecheck, and the onboarding build check.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 03:58:38 +05:30
suraj-markup 717253cf8e fix(web): harden project validation, fetch timeout, and test coverage
- centralize project existence check via validateConfiguredProject
  (Object.hasOwn) and apply to spawn, issues, verify, orchestrators routes
- add AbortController (1.5s) to runtime terminal config fetch in DirectTerminal
- add runtimeFetchDone flag to prevent repeated fetches on reconnect
- restore resolveDashboardProjectFilter fallback to getPrimaryProjectId()
- expand runtime terminal endpoint tests (defaults, invalid ports, proxy path)
- add validation.test.ts covering prototype-chain bypass cases
- add undefined case test for resolveDashboardProjectFilter
- update changeset with full list of changes for npm publish

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 03:17:42 +05:30
Ashish Huddar 8d16049222 fix: correct mismatched status colors after light/dark token swap
- Light mode --color-status-ready: #5B7EF8 → #5e6ad2 (DESIGN.md specifies darker shade for light backgrounds)
- Light mode --color-tint-red: rgba(207,34,46,...) → rgba(220,38,38,...) to match new #dc2626
- Dark mode --color-tint-red: rgba(255,123,114,...) → rgba(239,68,68,...) to match new #ef4444
- ActivityDot.tsx: update hardcoded bg tints — active gets green rgba(34,197,94,0.1), ready gets blue rgba(91,126,248,0.1)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 00:42:34 +05:30
Ashish Huddar f4ba0fb64d implement design system: Geist Sans, new accent tokens, GPU-composited dot pulse
- Replace IBM Plex Sans/Mono with Geist Sans (keep JetBrains Mono)
- Update accent: #5e6ad2 → #5B7EF8 (blue), add amber respond/cyan review status tokens
- Update status colors: working=green #22c55e, ready=blue #5B7EF8, error=red #ef4444
- Add --radius-base: 2px; apply 2px border-radius to session cards and orchestrator buttons
- Replace box-shadow activity-pulse with GPU-composited dot-ring pseudo-element (.dot-pulse)
- Remove ready-rail-breathe and ready-sheen keyframes (decorative anxiety, high perf cost)
- Update card entrance: slide-up uses 8px translateY and spring easing cubic-bezier(0.16,1,0.3,1)
- Cap nav backdrop-filter at blur(12px)
- Add contain: layout style paint to session cards
- Pulse animation min-opacity 0.4→0.6

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 00:10:28 +05:30
suraj-markup 5315e4e0ab fix(web): runtime terminal port resolution + project-id hardening 2026-03-28 19:23:15 +05:30
ruskaruma e58117a9d0 address reviews 2026-03-27 08:56:21 +05:30
ruskaruma a17053bf2d test(web): add concurrency test for parallel PR enrichment (#729) 2026-03-27 08:13:21 +05:30
ruskaruma 41651164e7 perf(web): parallelize PR enrichment in GET /api/sessions(fixes #729) 2026-03-27 03:52:42 +05:30
Ashish Huddar af6c4c5add
Merge pull request #634 from ComposioHQ/feat/issue-633
chore(web): mobile-responsive layout for dashboard and session views
2026-03-27 01:44:07 +05:30
Ashish Huddar c32fb6a03c Fix session polling and BottomSheet freshness 2026-03-27 01:38:54 +05:30
Ashish Huddar 8ce7366b82 Import useRef for session detail page 2026-03-27 01:34:13 +05:30