Commit Graph
206 Commits
Author SHA1 Message Date
David KayaandCopilot 0ed22adb03 style: add leading-none to pill text to ensure 8px font takes effect
Add explicit leading-none alongside text-[8px] so both font-size
and line-height shrink, making the size reduction visually apparent.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 20:32:44 +01:00
David KayaandCopilot 689b853a8a style: set pill font to 8px and add breathing room around icons
Reduce font to text-[8px], restore icons to size-2.5 for legibility,
and bump padding to px-1.5 py-0.5 so icons aren't flush with the
pill border.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 20:28:43 +01:00
David KayaandCopilot 23c8a6bb9b style: further shrink inline pills to match surrounding text density
Reduce to text-[10px] (matching agent badges), px-1 py-px padding,
gap-0.5, size-2 icons, rounded (not rounded-md), and 100px model
name truncation. Pills now sit subtly alongside 13px chat text.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 20:25:50 +01:00
David KayaandCopilot fa037859da style: reduce inline pill button size above chat composer
Shrink padding (px-2 py-1 → px-1.5 py-0.5), font (12px → 11px),
gap (1.5 → 1), icon size (3 → 2.5), and model name max-width
(140px → 120px) on all four pill trigger buttons. Dropdown popovers
remain unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 20:20:36 +01:00
David KayaandCopilot 1b1ebdb676 fix: move handleCreateScratchpad above early return to fix hooks order
The useCallback for handleCreateScratchpad was placed after the early
return for the loading state, causing React to see a different number
of hooks between the initial render (workspace undefined) and subsequent
renders. Move it before the guard and add a null check inside instead.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 20:16:44 +01:00
David KayaandCopilot fcfc5c9641 refactor: decompose large frontend components into focused modules
Split six monolithic component files into smaller, single-responsibility
modules organized by feature domain:

- ChatPane (1054→~250 lines): extract InlinePills, ApprovalBanner,
  ThinkingDots into chat/ directory
- SettingsPanel (1027→~280 lines): extract McpServerEditor,
  LspProfileEditor, ToolingEditorShell into settings/ directory;
  mutation helpers into lib/settingsHelpers.ts
- PatternEditor: use shared ToggleSwitch from ui/
- App.tsx: extract useTheme and useSidecarCapabilities into hooks/
- Sidebar: extracted accessibility improvements inline

New shared primitives:
- hooks/useClickOutside: replaces 5 duplicated click-outside listeners
- components/ui/: ToggleSwitch, PopoverToggleRow, FormField, TextInput,
  TextareaInput, SelectInput, InfoCallout

Accessibility improvements:
- NewSessionModal: role=dialog, aria-modal, Escape-to-close
- Pill dropdowns: aria-expanded, aria-haspopup, role=listbox/option
- Sidebar context menu: role=menu/menuitem, Escape-to-close
- SessionItem: Space key activation alongside Enter
- ToolbarButton: aria-pressed for toggle state
- ApprovalBanner: role=alert
- QueuedApprovalsList: aria-expanded on toggle
- ThinkingDots: aria-label

No behavioral changes. All 137 tests pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 20:12:36 +01:00
David KayaandCopilot 4f202274db feat: replace PrismJS with highlight.js for code syntax highlighting
PrismJS's CJS global state is fundamentally incompatible with Vite's ESM
dev mode, causing missing language support (~40% of dropdown languages)
and fragile loading hacks (optimizeDeps, global assignment).

Replace the entire Prism integration with highlight.js/lib/common which
is ESM-native, has no global state, and covers all 22 dropdown languages
out of the box (~37 common languages included).

Implementation:
- Custom CodeHighlightPlugin using hljs.highlight() for tokenization
- HTML parser extracts flat tokens from hljs output (handles nested spans)
- Token type mapping from hljs scopes to Lexical codeHighlight theme keys
- Selection preservation via absolute character offset save/restore
- Re-entrancy guard prevents infinite transform loops
- Removed @lexical/code-prism import and Vite optimizeDeps workaround

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 20:08:14 +01:00
David KayaandCopilot 2338d7c44b fix: resolve Prism CJS loading crash in Vite dev mode
Remove the prismSetup module that imported prismjs directly — it
caused Vite to pre-bundle prismjs into a separate chunk from
@lexical/code-prism, breaking the CJS require chain.  Language
components tried to call Prism.languages.extend() before the base
grammars were available, crashing the app.

Instead, add optimizeDeps.include for prismjs and @lexical/code-prism
so Vite pre-bundles them together, preserving the correct CJS
evaluation order within a single chunk.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 20:03:57 +01:00
David KayaandCopilot 5dc86426b1 fix: move Prism global setup to entry-point module
The previous approach imported prismjs component files directly in
MarkdownComposer.tsx.  In Vite dev mode, each component is served
as a separate ESM module whose IIFE references a bare 'Prism' global
that doesn't exist yet, crashing the app.

Fix: create a dedicated prismSetup module that imports prismjs and
assigns globalThis.Prism, then import it from the renderer entry
point (main.tsx) before any component that loads @lexical/code-prism.
ESM evaluation order guarantees the global is set before the
tokenizer captures its reference.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 20:03:02 +01:00
David KayaandCopilot 860876172e feat: enable Prism syntax highlighting in code blocks
- Register CodeHighlightNode in the editor node set
- Add CodeHighlightPlugin that calls registerCodeHighlighting
- Map 20+ Prism token types to mc-tok-* CSS classes with dark theme colors
- Explicitly import prismjs + language components and set globalThis.Prism
  before @lexical/code-prism loads, fixing a Vite dev-mode race where
  the CJS shim could initialize the tokenizer before the global was set
- Added @types/prismjs for type checking

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 19:52:54 +01:00
David KayaandCopilot 8240468d1e feat: enable Prism-based syntax highlighting in code blocks
- Register CodeHighlightNode in the editor node set
- Add CodeHighlightPlugin that calls registerCodeHighlighting
- Map codeHighlight theme keys to mc-tok-* CSS classes
- Add dark-theme token colors for 20+ Prism token types

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 19:52:41 +01:00
David KayaandCopilot 38d7e339a2 fix: replace imperative DOM overlay with React-based positioning
The imperative approach inserted overlay elements directly into
Lexical-managed CodeNode DOM elements.  Lexical's MutationObserver
detected the foreign DOM nodes, reconciled them away, which triggered
update listeners that re-inserted them — causing an infinite loop
that froze the app.

The new approach renders overlay elements via React, positioned
absolutely in a pointer-events:none container that sits over the
content editable.  Overlay positions are computed from each code
element's bounding rect and updated via requestAnimationFrame on
editor updates and scroll events.  This avoids all Lexical DOM
mutation and eliminates the freeze.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 19:49:16 +01:00
David KayaandCopilot 9ef7150183 feat: move language selector onto code block, fix code block insertion
Language selector:
- Replaced toolbar dropdown with an imperative overlay rendered
  directly inside each code block's DOM element
- Overlay uses contentEditable='false' + position:absolute at the
  top-right of the code block, styled as a compact native select
- Plugin re-inserts overlays after each Lexical reconciliation to
  survive DOM diffing

Code block insertion:
- toggleCodeBlock now inserts a trailing paragraph after the code
  block when it would otherwise be the last element, so the user
  can always type regular text below a code block

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 19:42:58 +01:00
David KayaandCopilot 039b9037ee feat: add code block language selector to composer
When the cursor is inside a code block, the formatting toolbar shows
a language dropdown (22 languages). Selecting a language updates the
CodeNode, which the markdown serializer writes as the fenced code
block language tag (e.g. \\\	ypescript).

A CodeBlockLabelPlugin syncs a data-code-language attribute on each
code block element so CSS ::before shows the friendly language name
as a small label at the top of the block.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 19:37:08 +01:00
David KayaandCopilot 1f9203e1da fix: send button clearance and code block display mode
- Increase editable min-height from 40px to 52px and padding from 8px
  to 10px so the send button (32px + 8px bottom offset) has 12px
  clearance from the toolbar border instead of 0px
- Add display: block to .mc-code-block — Lexical CodeNode renders as
  <code> which is inline by default, causing border/padding to split
  visually across lines instead of forming a proper block
- Revert empty code block to code.select() without synthetic TextNode

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 19:35:25 +01:00
David KayaandCopilot d84de12f45 fix: send button overlaps toolbar border and empty code block glitch
- Move send button into MarkdownComposer children slot so it positions
  relative to the editor content area, not the full container
- Always create a text node when inserting a code block to prevent
  Lexical from rendering a split/empty code block artifact

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 19:31:24 +01:00
David KayaandCopilot 77194d1f01 feat: replace textarea with Lexical WYSIWYG markdown composer
Replace the plain <textarea> in ChatPane with a full WYSIWYG
markdown composer built on Lexical 0.42.0.

Composer features:
- Rich text editing with inline formatting (bold, italic, code)
- Block-level elements: headings, bullet/numbered lists, code blocks,
  blockquotes, links via markdown shortcuts (e.g. ## , - , \\\)
- Formatting toolbar with active-state indicators
- Markdown paste auto-import when the editor is empty
- Enter to send, Shift+Enter for newline (matches prior behavior)
- Disabled state syncs with session busy/config states
- Serializes to markdown on submit via the backend helpers

Files:
- New: MarkdownComposer.tsx (Lexical editor, toolbar, internal plugins)
- Modified: ChatPane.tsx (swap textarea for MarkdownComposer, simplify state)
- Modified: styles.css (add markdown composer theme classes)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 19:21:13 +01:00
David KayaandCopilot d07bf30e81 feat: add markdown composer backend foundation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 19:19:58 +01:00
David Kaya a8c6ba94f5 feat: collapse timeline automatically 2026-03-25 00:25:00 +01:00
David KayaandCopilot 2c972a063a fix: tighten handoff routing behavior
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 23:47:31 +01:00
David KayaandCopilot f67fab0816 fix: edge selection highlighting and group-chat connection rules
- Add CSS styling for selected edges (indigo highlight with glow)
- Enable orchestrator↔agent connections in group-chat mode
- Downgrade disconnected-agent validation from error to warning
- Rename addHandoffEdge to addEdge (generic for all modes)
- Add tests for group-chat connection rules

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 23:41:00 +01:00
David KayaandCopilot f0d7d44589 feat: enable edge deletion in group-chat mode
Extend edge deletion to group-chat orchestrator↔agent edges in addition
to handoff agent↔agent edges. Structural edges (user-input/output,
distributor/collector) remain non-deletable across all modes.

Sequential, concurrent, and single modes keep fully structural topologies
with no user-deletable edges.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 23:34:38 +01:00
David KayaandCopilot 24bbf1ded3 fix: agent node deletion, inspector layout, and header overlap
- Enable Delete-key removal of agent nodes on the canvas; system nodes
  remain non-deletable. Removals route through the authoritative
  removeAgent path which prevents deleting the last agent.
- Stack Model and Reasoning selects vertically in the inspector panel
  so they fit within the 320px-wide column without truncation.
- Add right padding (pr-36 / 144px) to the editor header so the Save
  and Delete buttons clear the Windows title-bar overlay controls.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 23:32:22 +01:00
David KayaandCopilot c81ea6f83b feat: improve graph readability with colored edges, bezier curves, and auto-layout
- Color-code edges by semantic role: structural edges (system↔node) in
  muted zinc, agent-to-agent edges in indigo for clear visual separation
- Switch from smoothstep to bezier curves for smoother, more natural
  edge routing that reduces right-angle overlaps
- Stagger agent nodes at alternating X offsets in concurrent, handoff,
  and group-chat layouts so parallel fan-out/fan-in edges take distinct
  bezier paths instead of stacking
- Increase spacing in all layouts to give edges more room
- Add dagre-powered auto-layout button (top-right of canvas) that
  computes optimal left-to-right hierarchical node positions
- Add 2 new tests for auto-layout across all orchestration modes

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 23:27:43 +01:00
David Kaya 9b689e1411 Revert "fix: show single handle per node, rely on arrow for direction"
This reverts commit b5b4f1b1c6.
2026-03-24 23:21:15 +01:00
David KayaandCopilot b5b4f1b1c6 fix: show single handle per node, rely on arrow for direction
Hide the target (left) handle on SystemNode and AgentNode so each node
displays only one visible circle. The directional arrow marker on edges
communicates flow direction, halving the visual handle count.

- user-input:  source handle on right (visible)
- user-output: target handle on left  (visible)
- all others:  source handle on right (visible), target on left (hidden)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 23:18:55 +01:00
David KayaandCopilot eb2c8450e3 feat: directional edges and provider icons on agent nodes
- Add ArrowClosed markers to all graph edges for clear directional flow
- Replace generic Bot icon with AI provider logos (OpenAI, Anthropic,
  Google) on agent nodes, inferred from the agent's model id
- Show model display name as subtitle on agent nodes (e.g. 'GPT-5.4',
  'Claude Opus 4.5')
- Thread availableModels catalog from PatternEditor through canvas to
  resolve friendly model names; falls back to raw model id
- Add 3 new tests for arrow markers, provider icons, and model labels

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 23:16:04 +01:00
David KayaandCopilot c6c8e79e9f fix: address graph editor UX feedback
- Hide input handle on User Input nodes and output handle on User Output
  nodes (separate userInputNode/userOutputNode node types)
- Enable edge deletion in handoff mode only (Delete key or React Flow UI);
  only agent-to-agent edges are deletable, structural edges are protected
- Block all edge mutations (add/delete) in concurrent and group chat modes
- Add agent as disconnected node without auto-rebuilding the graph
- Add sequential reorder controls (↑↓) in the inspector panel with
  position/order swap and automatic edge rebuilding
- Replace circular group chat layout with vertical column to prevent
  bidirectional edge crossings
- Tighten handoff layout spacing so edges between triage and specialists
  don't overlap nodes
- Use smoothstep edge type for cleaner edge routing across all modes
- Add 6 new tests covering reorder, disconnected add, edge deletion rules,
  and node type assertions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 23:09:21 +01:00
David KayaandCopilot 7d078faada feat: replace form-based pattern editor with interactive graph canvas
Replace the flat agent list and static flow diagrams in PatternEditor with
an interactive React Flow canvas backed by the authoritative PatternGraph
model. Users can now see and manipulate orchestration topology visually.

Changes:
- Add @xyflow/react (React Flow) as a canvas library
- Create patternGraph view-model layer for graph-to-canvas projection
- Create GraphNodes with custom system/agent node components
- Create PatternGraphCanvas with drag, connect, and selection support
- Create PatternGraphInspector for selected node/agent details
- Rewrite PatternEditor with split layout: canvas + inspector sidebar
- Add dark theme CSS overrides for React Flow
- Add 11 tests covering view-model projection, connection rules, and
  graph mutation helpers
- Update ARCHITECTURE.md to reflect the new renderer graph boundary

The canvas projects PatternGraph into React Flow nodes/edges. Handoff mode
supports drawing new agent-to-agent edges interactively. Node positions
persist to the graph on drag completion. Agent editing moves from inline
forms to the inspector panel on node selection.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 22:54:02 +01:00
David KayaandCopilot 2e2caf78f9 feat: add graph-backed orchestration topology
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 22:44:17 +01:00
David KayaandCopilot 5ab0b22d15 fix: align orchestration behavior with agent framework docs
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 22:09:52 +01:00
David KayaandCopilot 2891d4bc90 refactor: move session controls from activity panel to chat input
Move interactive tool toggles and auto-approval overrides from the
ActivityPanel side panel into compact pill-style popovers above the
chat composer in ChatPane. This cleanly separates concerns:

- ActivityPanel is now purely read-only (agents + timeline)
- ChatPane owns all session-level interactive controls
- Tools pill: popover with MCP/LSP enable/disable toggles
- Auto-approval pill: popover with grouped tool auto-approval overrides
  including session override state and reset action

Follows the existing InlineModelPill/InlineThinkingPill pattern for
scratchpad sessions, giving non-scratchpad sessions the same kind
of inline configuration experience.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 20:28:08 +01:00
David KayaandCopilot b4330ec01d fix: improve approval auto-approval UX
- fix double-toggle bug in PatternEditor (nested buttons caused clicks to cancel out)
- only show tool auto-approval section when tool-call checkpoint is enabled
- group tools by kind (built-in, MCP, LSP) with sub-headers when mixed
- remove redundant per-row shield icons and kind badges from ActivityPanel
- fix missing bottom margin on Tools section in ActivityPanel
- shorten and clarify status badges and empty-state messages

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 20:20:56 +01:00
David KayaandCopilot 130b114906 fix: use runtime tools for approval auto-approval
- load runtime tools dynamically from Copilot CLI capabilities via tools.list
- merge runtime tools with configured MCP and LSP tools in the approval catalog
- keep a fallback builtin runtime tool list when capabilities are unavailable
- move approval-tool pruning to the app service so dynamic tools are not dropped on load
- update approval UI and docs to use the corrected runtime-tool model

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 20:16:11 +01:00
David KayaandCopilot 4b7409368f feat: add tool auto-approval UX in pattern editor and activity panel
- PatternEditor: tool auto-approval defaults section with toggles per tool
- ActivityPanel: per-session override section with inherited/custom state and reset action
- ChatPane: surface toolName in approval banner and queued approval list
- Disable controls while running; scratchpad non-interactive explanation
- Use listApprovalToolDefinitions() exclusively for tool identity

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 20:14:14 +01:00
David KayaandCopilot d5c538eed9 feat: add tool-specific approval overrides
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 20:02:29 +01:00
David KayaandCopilot f896fa6442 feat: add approval queue UX with position labels, queue preview, and count badges
- ChatPane: show 'Approval 1 of N' label, queued-approvals accordion preview,
  queue count badge in header, and hint text for queue advancement
- Sidebar: show '+N queued' count next to 'Awaiting approval' badge
- ActivityPanel: show total approval count in header badge

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 19:56:47 +01:00
David KayaandCopilot c6e20da8db fix: queue session approvals
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 19:56:21 +01:00
David KayaandCopilot f54cbdb6b1 feat: add approval checkpoint UX across renderer
- ChatPane: approval banner with approve/reject, final-response preview, error handling
- PatternEditor: approval checkpoints section with toggles and agent scope selector
- Sidebar: amber awaiting-approval badge replaces running indicator when pending
- ActivityPanel: shield icon approval badge in header
- RunTimeline: approval kind badge, detail text, status-aware colors

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 19:52:23 +01:00
David KayaandCopilot 2aa8d73b2d feat: add approval checkpoints backend
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 19:48:58 +01:00
David KayaandCopilot 75934a161a fix: sync title bar overlay colors with app theme
The Windows title bar overlay (minimize/maximize/close buttons) was
hardcoded to dark colors and did not update when switching themes.

- Add titleBarTheme helper that maps AppearanceTheme to overlay and
  background colors, using nativeTheme for the system preference
- Call applyTitleBarTheme from the setTheme IPC handler so the overlay
  updates immediately on theme change
- Apply persisted theme on startup so the overlay matches from launch

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 19:31:49 +01:00
David KayaandCopilot 973e5eb25c feat: implement light mode with settings toggle
Add appearance theme support (dark/light/system) using CSS custom
property overrides. In light mode the Tailwind zinc scale is inverted
and semantic surface/border tokens are swapped, so all existing
utility classes pick up the new palette automatically.

- Add AppearanceTheme type and theme field to WorkspaceSettings
- Add setTheme IPC channel wiring (contracts, preload, handler, service)
- Add [data-theme='light'] CSS overrides for zinc scale, surface tokens,
  scrollbar, and markdown prose colours
- Add Appearance section to SettingsPanel with radio-button theme picker
- Apply data-theme attribute on document root via useEffect in App.tsx,
  with matchMedia listener for the system option

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 19:28:48 +01:00
David KayaandCopilot 33c4cee0b4 fix: normalize oversized font sizes across the UI
Tighten font sizes to match the app's compact design language:

- WelcomePane: heading from text-xl (20px) to text-base (16px),
  buttons and descriptions from text-sm (14px) to text-[13px]
- SettingsPanel: all section headings from text-sm to text-[13px]
- NewSessionModal: title from text-sm to text-[13px]
- PatternEditor: title from text-sm to text-[13px]
- ChatPane: empty-state prompt from text-sm to text-[13px]
- Markdown prose: h1 from 1.25rem to 1.125rem, h2 from 1.125rem
  to 1rem, h3 from 1rem to 0.9375rem

Keeps text-sm only for the app brand name, loading state, and error
headings where larger text is intentional.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 19:24:08 +01:00
David KayaandCopilot ff5fcb3a65 fix: exclude scratchpad from the new-session modal
The modal is now only used for project sessions, so filter out the
scratchpad project from the dropdown and remove scratchpad-specific
hints and pattern restrictions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 19:14:35 +01:00
David KayaandCopilot 72e028c617 fix: let the new-session button replace the empty state text
When no sessions exist and a creation button is available, show only
the button — it already communicates emptiness and provides the CTA.
The old 'No sessions yet' text is kept as fallback only when no button
is present.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 19:07:02 +01:00
David KayaandCopilot 30733ae59a feat: replace top-level New Session button with contextual buttons
Remove the single New Session button from the sidebar top and replace it
with contextual creation buttons scoped to each section:

- Scratchpad section: 'New Scratchpad' button that auto-creates a
  scratchpad session with the first available single-agent pattern
- Project groups: 'New Session' button that opens the pattern picker
  modal pre-scoped to that project
- WelcomePane: primary action updated to 'New Scratchpad'

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 19:05:50 +01:00
David KayaandCopilot a79787735a feat: use app icon as sidebar logo
Replace the Sparkles icon gradient placeholder with the actual app
icon from assets/icons/icon.png. Import it as a Vite asset so it
works in both dev and production builds.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 00:58:04 +01:00
David KayaandCopilot ebf5923530 fix: center header content with symmetric padding
Use pt-3 pb-3 (12px each) for symmetric vertical padding so content
is visually centered in every header bar.

To keep headers draggable, each header container gets the drag-region
class and all interactive elements (buttons) get the no-drag class.
The global fallback drag strip is reduced to h-3.
Title bar overlay reduced from 40px to 32px (standard Windows size).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 00:54:11 +01:00
David KayaandCopilot 9964a7fd1a fix: move useCallback before early return to fix hooks ordering
The jumpToMessage useCallback was placed after a conditional return,
violating React's Rules of Hooks and crashing the app on render.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 00:23:30 +01:00
David KayaandCopilot 0d3f1cbd50 feat: add rich run timeline UI with collapsible cards and jump-to-message
- Add RunTimeline component with vertical event timeline, collapsible run
  cards, per-kind icons, status animations, and agent lane badges
- Add runTimelineFormatting helpers for timestamps, durations, labels,
  content truncation, and consecutive thinking-event collapsing
- Integrate Timeline section into ActivityPanel between Agents and Tools
- Wire jump-to-message in App.tsx using DOM data-message-id attributes
  on ChatPane messages with smooth scroll and temporary highlight ring
- Add comprehensive unit tests for all formatting helpers
- Update HANDOVER.md to document completed frontend implementation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 00:17:14 +01:00