Commit Graph

658 Commits

Author SHA1 Message Date
dotta
9093cfbe4f fix: address greptile routine review 2026-03-20 16:26:29 -05:00
dotta
e3c92a20f1 Merge remote-tracking branch 'public-gh/master' into paperclip-routines
* public-gh/master: (46 commits)
  chore(lockfile): refresh pnpm-lock.yaml (#1377)
  fix: manage codex home per company by default
  Ensure agent home directories exist before use
  Handle directory entries in imported zip archives
  Fix portability import and org chart test blockers
  Fix PR verify failures after merge
  fix: address greptile follow-up feedback
  Address remaining Greptile portability feedback
  docs: clarify quickstart npx usage
  Add guarded dev restart handling
  Fix PAP-576 settings toggles and transcript default
  Add username log censor setting
  fix: use standard toggle component for permission controls
  fix: add missing setPrincipalPermission mock in portability tests
  fix: use fixed 1280x640 dimensions for org chart export image
  Adjust default CEO onboarding task copy
  fix: link Agent Company to agentcompanies.io in export README
  fix: strip agents and projects sections from COMPANY.md export body
  fix: default company export page to README.md instead of first file
  Add default agent instructions bundle
  ...

# Conflicts:
#	packages/adapters/pi-local/src/server/execute.ts
#	packages/db/src/migrations/meta/0039_snapshot.json
#	packages/db/src/migrations/meta/_journal.json
#	server/src/__tests__/agent-permissions-routes.test.ts
#	server/src/__tests__/agent-skills-routes.test.ts
#	server/src/services/company-portability.ts
#	skills/paperclip/references/company-skills.md
#	ui/src/api/agents.ts
2026-03-20 15:04:55 -05:00
dotta
0ca479de9c Handle directory entries in imported zip archives 2026-03-20 14:09:21 -05:00
dotta
553e7b6b30 Fix portability import and org chart test blockers 2026-03-20 14:06:37 -05:00
dotta
5140d7b0c4 Merge remote-tracking branch 'public-gh/master' into paperclip-company-import-export
* public-gh/master:
  fix: address greptile follow-up feedback
  docs: clarify quickstart npx usage
  Add guarded dev restart handling
  Fix PAP-576 settings toggles and transcript default
  Add username log censor setting
  fix: use standard toggle component for permission controls

# Conflicts:
#	server/src/routes/agents.ts
#	ui/src/pages/AgentDetail.tsx
2026-03-20 13:28:05 -05:00
dotta
360a7fc17b fix: address greptile follow-up feedback 2026-03-20 13:18:29 -05:00
dotta
13fd656e2b Add Beta badge to Routines page and sidebar nav
Adds an amber "Beta" tag next to "Routines" in both the page heading
and the sidebar navigation item. Extends SidebarNavItem with textBadge
and textBadgeTone props for reusable text badges.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 13:10:45 -05:00
dotta
9ee440b8e4 Add Routine badge to issue detail for routine-generated issues
Issues created from routine executions now display a clickable "Routine"
badge in the header bar, linking back to the originating routine.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-20 09:13:30 -05:00
dotta
79652da520 Address remaining Greptile portability feedback 2026-03-20 08:55:10 -05:00
dotta
8fc399f511 Add guarded dev restart handling
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-20 08:50:00 -05:00
dotta
dd44f69e2b Fix PAP-576 settings toggles and transcript default
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-20 08:50:00 -05:00
dotta
39878fcdfe Add username log censor setting
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-20 08:50:00 -05:00
dotta
3de7d63ea9 fix: use standard toggle component for permission controls
Replace the button ("Enabled"/"Disabled") for "Can create new agents" and
the custom oversized switch for "Can assign tasks" with the same toggle
style (h-5 w-9, bg-green-600/bg-muted) used throughout Run Policy.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-20 08:50:00 -05:00
dotta
0bb6336eaf Adjust default CEO onboarding task copy
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-20 08:22:45 -05:00
dotta
fb760a63ab Fix routine toggle dirty tracking
Remove routine status from the editable detail draft so the active/paused switch remains an immediate save path instead of surfacing unsaved form state.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-20 08:02:34 -05:00
dotta
971513d3ae fix: default company export page to README.md instead of first file
When navigating to the company export page without a specific file in
the URL, select README.md by default instead of whichever file happens
to be first in the export result (previously COMPANY.md).

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-20 07:59:32 -05:00
dotta
0f45999df9 Bundle default CEO onboarding instructions
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-20 07:38:05 -05:00
dotta
d7a08c1db2 Remove process from CEO onboarding adapters
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-20 07:18:58 -05:00
dotta
bf5cfaaeab Hide deprecated agent working directory by default
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-20 07:04:41 -05:00
dotta
2a33acce3a Remove api trigger kind and mark webhook as coming soon
Drop "api" from the trigger kind dropdown and disable the "webhook"
option with a "COMING SOON" label until it's ready.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-20 06:54:03 -05:00
dotta
b72279afe4 Clean up routine activity tab: remove pill badges, use inline text
Replace the cluttered rounded-full bordered pills around each activity
detail with clean inline text separated by dot separators. Wrap in a
bordered card container matching the runs tab style.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 06:39:04 -05:00
dotta
4c6e8e6053 Move routine title into header row, remove Automation label
The editable title now sits in the header alongside Run Now and
the active/paused toggle, replacing the old "Automation" subheading.
This removes the redundant label and gives the title top-level
prominence in the routine detail view.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 06:38:45 -05:00
dotta
d07d86f778 Merge public-gh/master into paperclip-company-import-export 2026-03-20 06:25:24 -05:00
dotta
8cc8540597 Fix live run indicator: only show blue dot when a run is actually active
Previously used routine run status ("received"/"issue_created") which
are not the right signal. Now queries heartbeatsApi.liveRunsForIssue()
on the active issue to check if an agent is actually running — the same
source of truth the LiveRunWidget uses.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-20 06:22:51 -05:00
dotta
4fc80bdc16 Fix live run indicator: only show blue dot when a run is actually active
The blue dot and LiveRunWidget were driven by `routine.activeIssue`,
which returns any open execution issue — even after the heartbeat run
finishes. Now checks routineRuns for status "received" or "issue_created"
to determine if a run is actually in progress.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-20 06:20:01 -05:00
dotta
a0a28fce38 fix: address greptile feedback 2026-03-20 06:18:00 -05:00
dotta
22b38b1956 Use toggle for task assignment permission control
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-20 06:09:04 -05:00
dotta
4ffa2b15dc fix: suggest comment reassignment from recent commenter 2026-03-20 06:05:15 -05:00
dotta
c844ca1a40 Improve orphaned local heartbeat recovery
Persist child-process metadata for local adapter runs, keep detached runs alive when their pid still exists, queue a single automatic retry when the pid is confirmed dead, and clear detached warnings when the original run reports activity again.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-20 06:05:15 -05:00
dotta
7f3fad64b8 Move cost summary from standalone collapsible to top of Activity tab
Moves the cost summary out of a collapsible section below the tabs and
into the Activity tab content, displayed as a static card at the top.
Removes the now-unused `cost` state from `secondaryOpen`.

Closes PAP-559

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 06:05:15 -05:00
dotta
f9d685344d Expose agent task assignment permissions
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-20 06:05:15 -05:00
dotta
bcc1d9f3d6 Remove border containers from workspace fields in new project dialog
Strip the rounded-border card wrappers from repo URL and local folder
fields so they sit directly in the section. Add pt-3 to the section
so the first field doesn't touch the border-t above it.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-20 06:05:15 -05:00
dotta
25af0a1532 Interleave failed runs with issues and approvals in inbox
Failed runs are no longer shown in a separate section. They are now
mixed into the main work items feed sorted by timestamp, matching
how approvals are already interleaved with issues.

Replaced the large FailedRunCard with a compact FailedRunInboxRow
that matches the ApprovalInboxRow visual style.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-20 06:05:14 -05:00
dotta
72a0e256a8 Simplify new project dialog: always show repo and local folder fields
Remove the workspace setup toggle menu ("Where will work be done on this
project?") and instead always display both repo URL and local folder
inputs directly. Both fields are marked as optional with help tooltips
explaining their purpose. Repo is shown first, local folder second.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-20 06:05:14 -05:00
dotta
9e21ef879f Show agent name in inbox approval labels (e.g. "Hire Agent: Designer")
Instead of the generic "Hire Agent" label, display the agent's name from
the approval payload for hire_agent approvals across inbox, approval card,
and approval detail views.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 06:05:14 -05:00
dotta
915a3ff3ce fix: default comment reassign to last commenter who isn't me
When commenting on an issue, the reassign dropdown now defaults to the
last commenter who is not the current user, preventing accidental
self-reassignment. Falls back to the current issue assignee if no
other commenters exist.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 06:05:14 -05:00
dotta
2d7b9e95cb Merge public-gh/master into paperclip-company-import-export 2026-03-20 05:53:55 -05:00
dotta
c5f20a9891 Add live run support to routine detail page
- Blue dot indicator on Runs tab when there's an active run
- Run Now already switches to Runs tab (was done previously)
- LiveRunWidget shows streaming transcript in Runs tab for active runs
- Poll routine detail and runs list during active runs for real-time updates

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-19 17:51:07 -05:00
dotta
339c05c2d4 Remove Issues tab from routine detail page
Keep only Triggers, Runs, and Activity tabs per board request.
Cleaned up unused executionIssues query, IssueRow and ListTree imports.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-19 17:38:05 -05:00
dotta
21765f8118 Fix trigger delete: handle 204 No Content in API client
The DELETE /routine-triggers/:id endpoint returns 204 No Content, but
the API client unconditionally called res.json() on all responses,
causing a JSON parse error that surfaced as "API route not found".

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-19 17:31:27 -05:00
dotta
9998cc0683 Fix schedule time picker: cleaner hour labels, hide selectors for every-minute
- Change hour labels from "10:00 AM" to "10 AM" to avoid confusion with the separate minute selector
- Hide hour/minute selectors when "Every minute" preset is selected (no time config needed)
- Fix describeSchedule to work with updated hour label format

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-19 17:29:09 -05:00
dotta
c39758a169 Replace Mermaid org chart with PNG image in export preview
The frontend generateReadmeFromSelection() was building an inline Mermaid
diagram for the org chart. The server already generates a PNG at
images/org-chart.png, so the preview should reference it the same way.

Removed dead mermaidId/mermaidEscape/generateOrgChartMermaid helpers.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-19 17:23:27 -05:00
dotta
e341abb99c Improve routine configuration: delete triggers, fix pause, add feedback
- Remove per-trigger enabled/paused selector (routine-level only)
- Move save/rotate/delete buttons to the right in trigger editor
- Apply board feedback on UI cleanup

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-19 17:20:57 -05:00
dotta
5caf43349b Improve routine configuration: delete triggers, fix pause, add feedback
- Add trash icon button to delete triggers (full stack: service, route, API client, UI)
- Fix pause/unpause bug where saving routine could revert status by excluding
  status from the save payload (status is managed via dedicated pause/resume buttons)
- Add toast feedback for run, pause, and resume actions
- Auto-switch to Runs tab after triggering a manual run
- Add live update invalidation for routine/trigger/run activity events

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-19 16:45:08 -05:00
dotta
f7c766ff32 Fix markdown image rendering without resolver
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-19 16:41:28 -05:00
dotta
bdeaaeac9c Simplify routine configuration UI
- Add "Every minute" schedule preset as finest granularity
- Remove status and priority from advanced delivery settings
- Auto-generate trigger labels from kind instead of manual input

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-19 16:36:39 -05:00
dotta
a9802c1962 Resolve relative image paths in export/import markdown viewer
The MarkdownBody component now accepts an optional resolveImageSrc callback
that maps relative image paths (like images/org-chart.png) to base64 data URLs
from the portable file entries. This fixes the export README showing a broken
image instead of the org chart PNG.

Applied to both CompanyExport and CompanyImport preview panes.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-19 16:33:30 -05:00
dotta
6a7e2d3fce Redesign routines UI to match issue page design language
- Remove Card wrappers and gray backgrounds from routine detail
- Use max-w-2xl container layout like issue detail page
- Add icons to tabs (Clock, Play, ListTree, Activity) matching issue tabs
- Make activity tab compact (single-line items with space-y-1.5)
- Create shared RunButton and PauseResumeButton components
- Build user-friendly ScheduleEditor with presets (hourly, daily, weekdays, weekly, monthly)
- Auto-detect timezone via Intl API instead of manual timezone input
- Use shared action buttons in both AgentDetail and RoutineDetail
- Replace bordered run history cards with compact divided list

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-19 15:05:32 -05:00
dotta
ca3fdb3957 Set sourceType to skills_sh for skills imported from skills.sh URLs
When skills are imported via skills.sh URLs or key-style imports
(org/repo/skill), the stored sourceType is now "skills_sh" with the
original skills.sh URL as sourceLocator, instead of "github" with the
resolved GitHub URL.

- Add "skills_sh" to CompanySkillSourceType and CompanySkillSourceBadge
- Track originalSkillsShUrl in parseSkillImportSourceInput
- Override sourceType/sourceLocator in importFromSource for skills.sh
- Handle skills_sh in key derivation, source info, update checks,
  file reads, portability export, and UI badge rendering

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-19 14:15:35 -05:00
dotta
301437e169 Make routine rows clickable and add Edit to context menu
- Clicking any routine row navigates to its detail/edit view
- Renamed "Open" to "Edit" in the three-dot context menu
- Added stopPropagation on toggle switch and dropdown cells
  so interactive elements don't trigger row navigation
- Removed redundant Link wrapper on routine title

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 14:08:36 -05:00