Commit Graph

151 Commits

Author SHA1 Message Date
Forgotten
a57d3427f7 feat: foldable PROJECTS section in sidebar with color support
- Add `color` (text) and `archivedAt` (timestamp) columns to projects table
- Add PROJECT_COLORS palette constant (10 colors) in shared package
- Add color/archivedAt to Project type interface and Zod validators
- Auto-assign next available color from palette on project creation
- New SidebarProjects component with:
  - Collapsible PROJECTS header above WORK section
  - Caret toggle visible on hover (left of header)
  - Always-visible plus button (right of header) opens NewProjectDialog
  - Lists non-archived projects with colored rounded squares
  - Active project highlighted based on URL match
- Remove Projects nav item from WORK section in sidebar

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 09:14:08 -06:00
Forgotten
3392f4dbfa fix: use issue shortname (identifier) in activity feed instead of title
Activity feed and dashboard now display issue identifiers like PAP-32
instead of issue titles for entity names. Also uses identifier-based
URLs for issue links in the activity feed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 08:25:08 -06:00
Forgotten
fe63c10d69 Include issue identifier in all activity log details for notifications
Activity log events for issue.created and issue.updated were missing
the identifier field in their details, causing toast notifications to
fall back to showing a truncated UUID hash instead of the shortname
(e.g. PAP-47). Also includes checkout lock adoption and activity
query improvements.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 08:23:44 -06:00
Forgotten
57f88f6f6a feat: make comment identity headers clickable links to agent pages
Wraps the Identity component in comment headers with a Link to
/agents/{agentId} so users can click through to view agent details.
Applied to both CommentThread and ApprovalDetail comment sections.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 08:19:38 -06:00
Forgotten
40512ad533 Add hour and minute to comment timestamps on issue pages
Comments now show localized date+time (e.g. "Feb 20, 2026, 2:15 PM")
instead of just the date. Added formatDateTime utility to keep the
existing date-only formatDate unchanged for other contexts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 16:19:54 -06:00
Forgotten
95f0d36adc Fix @-mention tab completion cursor positioning
After tab-completing a mention, the cursor was placed before the
completion instead of after it. The root cause: Lexical's DOM
reconciliation after document.execCommand("insertText") would lose
the browser-set cursor position. Added requestAnimationFrame-based
cursor repositioning that first tries the original text node, then
falls back to searching for the mention text in the DOM.

Also normalizes editor content padding for consistent mention dropdown
positioning.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 16:07:37 -06:00
Forgotten
9906a5ba06 Support issue identifiers (PAP-39) in URLs and prefer them throughout
Backend:
- Add router.param middleware in issues, activity, and agents routes to
  resolve identifiers (e.g. PAP-39) to UUIDs before handlers run
- Simplify GET /issues/:id now that param middleware handles resolution
- Include identifier in getAncestors response and issuesForRun query
- Add identifier field to IssueAncestor shared type

Frontend:
- Update all issue navigation links across 15+ files to use
  issue.identifier ?? issue.id instead of bare UUIDs
- Add URL redirect in IssueDetail: navigating via UUID automatically
  replaces the URL with the human-readable identifier
- Fix childIssues filter to use issue.id (UUID) instead of URL param
  so it works correctly with identifier-based URLs
- Add issueUrl() utility in lib/utils.ts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 16:04:05 -06:00
Forgotten
0c0c308594 Make toast notifications more informative
- Server: Add bodySnippet, identifier, issueTitle to comment_added
  activity details so the UI can show comment content
- Client: Show comment snippet in comment toasts instead of just
  "posted a comment on PAP-39"
- Client: Add agent title/role as body text in agent status toasts
- Client: Show trigger detail in run status toasts for context

PAP-31

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 15:52:53 -06:00
Forgotten
cae0f416f2 Fix issue short-id vertical alignment in EntityRow
Add position: relative with top: 1px to the identifier span
so "PAP-38" style labels align properly in issue tables.

PAP-39

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 15:49:16 -06:00
Forgotten
65f09a1a9d UI: richer toasts, log viewer scroll fix, multi-goal projects, active panel issue context
Improve activity toasts with actor names, issue identifiers, and
action links. Fix LogViewer auto-scroll to work with scrollable
parent containers instead of only window. Add issue context display
to ActiveAgentsPanel run cards. Support multi-goal selection in
NewProjectDialog. Update GoalDetail to match multi-goal project
linking.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 15:48:42 -06:00
Forgotten
82da8739c1 Add board mutation guard middleware
Require trusted browser origin (Origin or Referer header) for
mutating requests from board actors, preventing cross-origin
mutation attempts against the local-trusted API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 15:48:30 -06:00
Forgotten
49e15f056d Implement issue execution lock with deferred wake promotion
Add per-issue execution lock (executionRunId, executionAgentNameKey,
executionLockedAt) to prevent concurrent runs on the same issue.
Same-name wakes are coalesced into the active run; different-name
wakes are deferred and promoted when the lock holder finishes.

Includes checkout/release run ownership enforcement, agent run ID
propagation from JWT claims, wakeup deduplication across assignee
and mention wakes, and claimQueuedRun extraction for reuse. Adds
two DB migrations for checkoutRunId and execution lock columns.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 15:48:22 -06:00
Forgotten
4e18cfa818 Add issue run orchestration plan
Document the design for per-issue execution locks that prevent
cascaded wakeups from spawning concurrent runs on the same issue.
Covers same-name coalescing, cross-agent deferral, and deferred
promotion on run completion.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 15:48:07 -06:00
Forgotten
3396a76c9c fix: consistent label spacing in all properties panes
Replace justify-between with fixed w-20 label width in PropertyRow
across IssueProperties, AgentProperties, GoalProperties, and
ProjectProperties for consistent two-column alignment.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 15:10:29 -06:00
Forgotten
487b3fe374 Remove collapsible behavior from sidebar Work and Company sections
The sidebar sections no longer fold/unfold — they are always visible.
Removed Collapsible component, chevron icon, and open/close state.

PAP-38

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 15:08:03 -06:00
Forgotten
7f382ce568 fix: add gap between labels and values in all properties panes
Add gap-3 to PropertyRow flex containers so labels don't touch their
values. Also add shrink-0 on labels and min-w-0 on value containers
to prevent overflow issues.

Applied to: IssueProperties, AgentProperties, GoalProperties,
ProjectProperties.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 15:00:56 -06:00
Forgotten
3a7afe7b66 fix: @-mention autocomplete selection and dismissal
- Use a ref for mentionState so selectMention always reads the latest
  value (prevents stale-closure "blink" on click/Enter/Tab)
- Add explicit space key handling to dismiss the popup immediately
- Move Escape handler outside filteredMentions check so it always works
- Sync mentionStateRef on all state transitions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 14:59:20 -06:00
Forgotten
735bea5dee fix: @-mention autocomplete — Enter/Tab/click now insert correctly
The old approach used document.execCommand("insertText") to directly
manipulate the contentEditable DOM, but MDXEditor (Lexical) reverted
these changes during reconciliation causing the "blink" bug.

Fix: work at the markdown string level instead — find the @query in
the markdown, replace it with @Name, and update via setMarkdown().
Also add an input event listener alongside selectionchange for more
reliable mention detection (fixes space-to-dismiss).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 14:53:46 -06:00
Forgotten
2d2906f23f feat: show child issues on issue detail page
Add a Sub-issues section between Comments and Linked Approvals on the
issue detail page. Lists child issues with status, priority, identifier,
title, and assignee. Reuses the cached company issues list for zero
extra API calls.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 14:48:30 -06:00
Forgotten
168d7a45e3 feat: add /issues/recent tab — flat list sorted by most recent updates
Shows all issues in a single flat list ordered by updatedAt descending,
without grouping by status. Displays the update timestamp instead of
creation date in the trailing column.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 14:18:59 -06:00
Forgotten
52224bc4aa feat: extract Permissions & Configuration pane, flatten Run Policy
- Move Advanced Adapter Settings into standalone Permissions & Configuration pane
- Convert create-mode Run Policy from collapsible to regular section
- Remove unused adapterAdvancedOpen and heartbeatOpen state

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 14:16:21 -06:00
Forgotten
53060e770c fix: log viewer auto-follow uses distance-from-bottom instead of element visibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 14:11:35 -06:00
Forgotten
38162dc317 feat: reorganize agent config form — Identity, Adapter, Run Policy panes
Move Prompt Template into Identity section, merge adapter type dropdown
into a unified Adapter pane, and rename Heartbeat Policy to Run Policy
with a collapsible Advanced Run Policy section.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 14:11:30 -06:00
Forgotten
4c8a1f4513 feat: toast UI improvements — bottom-left, animated, blur glass, richer messages
- Move toast viewport from top-right to bottom-left with slide-up animation
- Apply consistent transparent blur-glass styling across all tone colors
- Include agent names (from query cache) in agent status, run status,
  and activity toasts instead of truncated IDs
- Show specific change details for issue.updated toasts (status, priority)
- Use "New comment by AgentName" instead of generic "Issue comment added"
- Add truncation helper for long body text

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 14:03:43 -06:00
Forgotten
1b6db764b8 feat: toast dedupe alignment, per-type cooldown, and reconnect suppression
- Align local mutation dedupe keys with live event keys so the same
  action doesn't produce two toasts (local success + live event)
- Add per-type cooldown gate (max 3 toasts per category in 10s) to
  suppress rapid-fire events from chatty sources
- Suppress all live-event toasts for 2s after WebSocket reconnect to
  avoid burst floods from cached server events
- TTL tuning by severity already applied externally (info=4s,
  success=3.5s, warn=8s, error=10s)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 13:56:34 -06:00
Forgotten
5b06118ec8 feat: add severity-based TTL defaults for toast notifications
Info/success toasts auto-dismiss faster (3.5-4s) while warn/error
toasts persist longer (8-10s). Callers can still override with
explicit ttlMs. Dedupe, cooldown window, and MAX_TOASTS cap were
already in place from Phase 1.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 13:53:51 -06:00
Forgotten
45f67ae311 refactor: organize ActiveAgentsPanel feed by run, fix SKILL.md formatting
Switches feed aggregation from by-agent to by-run for more accurate
streaming output attribution. Adds newline note for plan tags in SKILL.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 13:47:27 -06:00
Forgotten
b459668009 fix: derive costs by-project from run usage instead of cost events
Joins heartbeat runs to issues via activity log to attribute costs to
projects. Shows project names instead of raw IDs in the UI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 13:47:21 -06:00
Forgotten
9ec8c54f41 feat: add toast notification system with success toasts
Adds ToastProvider/ToastViewport for in-app notifications with dedupe,
auto-dismiss, and action links. Wires success toasts to issue create,
issue update, and comment mutations. Adds live event toasts for activity,
agent status, and run status changes via LiveUpdatesProvider.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 13:47:13 -06:00
Forgotten
ef700c2391 feat: add project_goals many-to-many join table
Create project_goals join table with composite PK (project_id, goal_id),
backfill from existing projects.goal_id, and update the project service
to read/write through the join table. Shared types now include goalIds
and goals arrays on Project. Legacy goalId column is kept in sync.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 13:43:25 -06:00
Forgotten
0cf33695d3 feat: use markdown editor with @-mentions for issue comments
- Replaced plain textarea in CommentThread with MarkdownEditor
  for rich markdown editing (no toolbar, compact styling)
- Added @-mention autocomplete to MarkdownEditor:
  - Detects @ trigger while typing with cursor-positioned dropdown
  - Arrow key navigation, Enter/Tab to select, Escape to dismiss
  - Filters mentionable names as user types after @
- Added onSubmit prop to MarkdownEditor for Cmd/Ctrl+Enter support
- Agents from the company are passed as mentionable options

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 13:35:15 -06:00
Forgotten
c50223f68f feat: add New Goal dialog and Sub Goal button
- Added NewGoalDialog component with title, description (markdown),
  status, level, and parent goal selection
- Integrated dialog into DialogContext with parentId defaults support
- Added "+ New Goal" button on /goals page (both empty state and header)
- Added "+ Sub Goal" button on goal detail sub-goals tab that pre-fills
  the parent goal

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 13:12:39 -06:00
Forgotten
b49fc7451a fix: show "Unlimited budget" when budget is $0
When budgetCents is 0 (no budget set), the UI now shows "Unlimited
budget" instead of misleading "0% of $0.00 budget" throughout:

- Dashboard: metric card shows "Unlimited budget" instead of percentage
- Companies: shows "Unlimited budget" label instead of "/ $0.00"
- Costs: hides utilization percent and progress bar, shows "Unlimited budget"
- Inbox: suppresses budget utilization alert when no budget is set

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 12:56:04 -06:00
Forgotten
a621b55e90 Refine mention-triggered wake behavior and self-assign rules
Update agent skill to allow self-assign only on explicit @-mention
handoff with PAPERCLIP_WAKE_COMMENT_ID. Enrich wake contextSnapshot
with taskId, wakeCommentId, and wakeReason fields so agents can
identify mention-triggered runs. Clarify api-reference exception
for handoff-by-mention pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 12:50:56 -06:00
Forgotten
a4ba4a72cd Add MarkdownEditor component, asset image upload, and rich description editing
Introduce MarkdownEditor built on @mdxeditor/editor with headings,
lists, links, quotes, image upload with drag-and-drop, and themed CSS
integration. Add asset image upload API (routes, service, storage) and
wire image upload into InlineEditor multiline mode, NewIssueDialog,
NewProjectDialog, GoalDetail, IssueDetail, and ProjectDetail
description fields. Tighten prompt template editor styling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 12:50:45 -06:00
Forgotten
0f4ab72888 fix: move Skip permissions to Advanced section, fix indentation
- Moved "Skip permissions" toggle from ClaudeLocalConfigFields (main
  adapter config area) into ClaudeLocalAdvancedFields (collapsible
  advanced section)
- Fixed double-indentation on Advanced Adapter Settings by moving
  the CollapsibleSection out of the px-4 pb-3 wrapper div

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 12:50:36 -06:00
Forgotten
0131cf3449 Support concurrent heartbeat runs with maxConcurrentRuns policy
Add per-agent maxConcurrentRuns (1-10) controlling how many runs
execute simultaneously. Implements agent-level start lock, optimistic
claim-then-execute flow, atomic token accounting via SQL expressions,
and proper status resolution when parallel runs finish. Updates UI
config form, live run count display, and SSE invalidation to avoid
unnecessary refetches on run event streams.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 12:50:34 -06:00
Forgotten
f80a802592 Add adapter environment testing infrastructure
Introduce testEnvironment() on ServerAdapterModule with structured
pass/warn/fail diagnostics for all four adapter types (claude_local,
codex_local, process, http). Adds POST test-environment endpoint,
shared types/validators, adapter test implementations, and UI API
client. Includes asset type foundations used by related features.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 12:50:23 -06:00
Forgotten
de3efdd16b fix: move defaultCreateValues to separate file to fix HMR
AgentConfigForm.tsx exported both React components and a plain
object constant (defaultCreateValues), which broke Vite Fast Refresh.
Moved the constant to agent-config-defaults.ts so the component
module only exports React components.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 12:28:42 -06:00
Forgotten
8d5525d0da Add live badge to issues with active runs on /issues/active
Server: the /companies/:companyId/live-runs endpoint now returns
issueId extracted from contextSnapshot, so the UI can match runs
to issues without N+1 queries.

UI (Issues.tsx): fetches company live runs (with 5s polling), builds
a set of issue IDs with active runs, and shows a pulsing "Live" badge
in each matching issue row — matching the existing blue live indicator
style from AgentDetail.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 12:24:38 -06:00
Forgotten
260d525686 Navigate to run page after invoking heartbeat on agent detail
When clicking Invoke on the agent page, after the run is created the
browser now navigates to /agents/{id}/runs/{runId} so the user can
immediately see the live run.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 12:21:03 -06:00
Forgotten
aa329f4b8a Fix xs avatar alignment and dashboard task row layout
Adjust xs avatar vertical offset from top-[2px] to -top-px for better
baseline alignment. Restructure dashboard recent tasks rows so the
timestamp sits right-aligned outside the title text flow and title
truncates properly on desktop.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 11:35:59 -06:00
Forgotten
39f8d38528 UI: mobile responsive layout, streamline agent budget display, and xs avatar size
Make agents list force list view on mobile with condensed trailing
info. Add mobile bottom bar for config save/cancel and live run
indicator on agent detail. Make MetricCard, PageTabBar, Dashboard
tasks, and ActivityRow responsive for small screens. Add xs avatar
size for inline text flow. Remove redundant budget displays from
agent overview, properties panel, costs tab, and config form.
Add attachment activity verb labels.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 11:29:13 -06:00
Forgotten
a22af8f72f Clean up attachment objects on issue delete and suppress responseTime in logs
Delete storage objects for each attachment when an issue is removed.
Hide responseTime from pino-pretty console output to reduce noise.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 11:29:03 -06:00
Forgotten
ad748349cb Add deployment guidelines, assets/attachments spec, and humans-and-permissions plan
Document local-trusted vs cloud-hosted deployment scenarios in
PRODUCT.md. Spec out assets and issue_attachments tables with storage
provider abstraction and attachment API endpoints. Draft comprehensive
plan for human users, memberships, invites, permissions, and
agent-to-human task delegation across both deployment modes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 11:28:58 -06:00
Forgotten
fe1ede32b6 docs: add storage section to developer guide
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:33:47 -06:00
Forgotten
838480faef chore: add assets/attachments DB migration, CLI docs, and lockfile
Add migration 0010 for assets and issue_attachments tables, update CLI
documentation with storage configuration section, and sync pnpm lockfile.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:33:36 -06:00
Forgotten
3ad421965c fix(ui): responsive tab bar, activity row wrapping, and layout tweaks
Make PageTabBar render a native select on mobile, allow ActivityRow text
to wrap on narrow viewports, and minor layout adjustments in AgentDetail
and Issues pages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:33:18 -06:00
Forgotten
6d0f58d559 fix: storage S3 stream conversion, API client FormData support, and attachment API
Fix S3 provider to use async generator for web stream conversion instead
of Readable.fromWeb, add postForm helper and attachment API methods to
the UI client, and add local disk storage provider tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:33:10 -06:00
Forgotten
0a551e84e1 docs: update skill documentation for comment wakes, planning, and API enrichment
Add PAPERCLIP_WAKE_COMMENT_ID to adapter skill env table, add planning
workflow section and comment-wake guidance to paperclip skill, and update
API reference with project/goal resolution on issue ancestors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:32:41 -06:00