Commit Graph
1304 Commits
Author SHA1 Message Date
g-butandClaude Sonnet 4.6 2edb5ec83a fix(today): prevent unhandled rejections in server-action buttons
CommitmentItem.save() had no catch so network errors propagated silently —
now surfaces "Network error — try again" in the form. FulfillCommitment,
AbandonGoal, and DismissAlert all called server actions with try/finally
but no catch, producing unhandled rejections; added silent catch since state
stays correct and the button correctly ungates for retry.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 07:06:36 +02:00
g-butandClaude Sonnet 4.6 6d53517399 fix(goals): surface title/desc save errors and prevent unhandled rejections
commitTitle and commitDesc used ie.commit() but ignored the boolean return,
leaving users with no feedback when saves fail. Now shows a timed error below
the relevant field. toggleComplete, toggleAbandon, and all milestone operations
lacked catch blocks, creating unhandled promise rejections on API failures.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 07:00:58 +02:00
g-butandClaude Sonnet 4.6 ce267daa55 fix(money): prevent UI freeze when cancel-subscription action fails
onCancel() had no error handling — if the server action threw, setCancelling
stayed true forever with no recovery path. Added try/catch/finally, cancelError
state, Loader2 spinner on the Yes button, and error clearing on dialog re-open.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 06:50:15 +02:00
g-butandClaude Sonnet 4.6 a469e4f1a8 fix(inline-edit): keep editor open on save failure instead of silently closing
commit() previously called setEditing(false) in finally, so any failed save
(network error or non-OK API response) silently closed the editor — user saw
the old value and couldn't tell whether the save succeeded or failed.

Now commit() closes only on success and returns a boolean. Callers stay in
edit mode on failure, preserving the draft so users can retry or cancel.
Updated HabitRow to check the boolean return instead of .catch().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 06:40:44 +02:00
g-butandClaude Sonnet 4.6 61c76e6b2e fix(prompts): surface ScheduleModal API errors and prevent stuck loading state
If createCronJob threw (network error), setSaving was never called and the
button stayed in "Creating…" forever. If the API returned non-OK, the modal
still showed "Scheduled!" as if the job was created.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 06:29:25 +02:00
g-butandClaude Sonnet 4.6 12e2e96236 fix(habits): drop inaccurate optimistic streak update in today HabitsList
The toggle handler was optimistically setting streak ±1, but streak is
computed from consecutive history — it isn't simply current ± 1. More
critically, the error rollback only reset doneToday, leaving streak at
the wrong value permanently if the API call failed.

Removing the streak mutation fixes the rollback bug and eliminates the
inaccurate flash. The server-side value is already corrected immediately
by router.refresh() on success.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 06:20:58 +02:00
g-butandClaude Sonnet 4.6 5689812e41 fix(stream): include activeAgents in SSE change detection
agentRunning is derived independently from activeAgents (process CWD scan
vs. per-project agent ID array), so they can diverge when one agent stops
and another starts simultaneously. The control panel would show a stale
agent identity for the tick window until the next agentRunning transition.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 06:15:24 +02:00
g-butandClaude Sonnet 4.6 467bf248ce fix(habits): order active habits before inactive in getAllHabitsWithHistory
PostgreSQL sorts booleans ascending (false < true), so the previous
orderBy(habits.active, ...) put inactive habits at the top. Inactive
habits are dimmed with opacity-50 — they should appear below active ones.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 06:08:33 +02:00
g-butandClaude Sonnet 4.6 98e88b6516 refactor(money): eliminate redundant getActiveSubscriptions query
The money page fetched active subs and all subs separately — 2 DB
queries for data that's a strict subset. Now fetches getAllSubscriptions
once and filters active in memory. Removes getActiveSubscriptions from
the query layer entirely. Also drops dead getCurrentUserId() from
session.ts (deprecated, had zero callers).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 06:01:09 +02:00
g-butandClaude Sonnet 4.6 85a2803aa9 fix(profile): gate Writing section to site owner's public profile
Filesystem-based essays are site-wide content, not per-user writing.
On multi-user deployments, team member profiles incorrectly showed the
owner's essays as if they authored them. Gate on user.isDefault so
only the owner's profile renders the Writing section.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 05:50:31 +02:00
g-butandClaude Sonnet 4.6 32d6a40498 perf(queries): push inArray filter to DB in getHabitsByGoalIds and getGoalsByHabitIds
Both functions fetched all habit_goals rows for the user, then filtered
in memory — wasting bandwidth proportional to total goal/habit count.
Now the WHERE clause includes an inArray on the relevant FK so only
matching rows travel the wire.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 05:43:57 +02:00
g-butandClaude Sonnet 4.6 40d57805a3 perf(profile): deduplicate getUserByUsername with React cache() across generateMetadata + page
generateMetadata and the page component both called getUserByUsername with
the same argument in the same request, firing two DB queries. Wrapping the
function with React cache() collapses them to one — no other changes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 05:31:19 +02:00
g-butandClaude Sonnet 4.6 d0c1285269 refactor(queries): replace hand-rolled sql.join IN with inArray in fetchAttributesByEntityIds
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 05:25:47 +02:00
g-butandClaude Sonnet 4.6 77314bbd6d refactor(queries): extract getOrgPeerIds helper, reduce org peer lookup from 3 to 2 queries
getOrgProjects and getOrgEntityProjects both ran the same two-step
sequential query to find org peer IDs: fetch the caller's orgIds, then
fetch peer userIds from those orgs. Extract this as getOrgPeerIds() in
utils.ts using a single self-join on org_memberships, and update both
callers. Reduces 3 sequential round-trips to 2 per call, and eliminates
the duplicated lookup logic.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 05:18:47 +02:00
g-butandClaude Sonnet 4.6 49add0d9d9 perf(orgs): collapse 2N+1 queries to 2 flat queries with inArray grouping
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 05:04:57 +02:00
g-butandClaude Sonnet 4.6 06faad34b0 fix(middleware): remove conflicting middleware.ts, revert invalid regex anchor
Next.js 16 uses proxy.ts as the middleware file — creating middleware.ts caused
a startup conflict ("Both middleware file and proxy file detected"). Removed it.

The ^/...\$ regex anchor was also invalid for Next.js matchers (must start with /).
Reverted to original form. The authorized() belt-and-suspenders check added to
auth.config.ts in the prior commit is the definitive fix for invitation paths.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 04:53:57 +02:00
g-butandClaude Sonnet 4.6 f66c393c9e fix(middleware): restore middleware.ts, anchor matcher regex, guard invitation routes
Three related issues:
- proxy.ts rename broke production: Next.js requires middleware.ts; the build
  manifest was empty meaning no middleware ran in production. New middleware.ts
  re-exports from proxy.ts so logic stays in one place.
- Unanchored regex: /((?!...api/invitations/...).+) matched at substring
  position 4 in /api/invitations/<token>, so Turbopack ran the middleware on
  invitation routes despite the exclusion. Fixed with ^/...$ anchoring.
- Belt-and-suspenders: authorized() callback in auth.config.ts now explicitly
  returns true for /api/invitations/<token> paths regardless of regex behavior.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 04:39:39 +02:00
g-butandClaude Sonnet 4.6 7db7ab8490 fix(security): gate beacon-settings PATCH behind auth, remove duplicate check in stripe/checkout
beacon-settings PATCH had no auth guard and the middleware regex (api/beacon) accidentally
excluded it as a prefix match. stripe/checkout had two identical auth checks (dead code).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 04:15:48 +02:00
g-butandClaude Sonnet 4.6 eeff57654b fix(security): add auth guards to agent-launch and orchestration-execute
POST /api/agent/launch (starts AI agent processes in Zellij tabs) and
POST /api/orchestration/run/execute (runs OpenClaw against a project path)
were reachable by any valid bearer token without user verification,
completing the same bearer-passthrough gap fixed in the previous commit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 04:06:58 +02:00
g-butandClaude Sonnet 4.6 219ff990a3 fix(security): add auth guards to fleet-control and commit endpoints
Six handlers that the middleware passes through for bearer-token
requests had no in-handler auth check, allowing any valid ck_* agent
token to call them regardless of the owning user:

  POST /api/project/commit        — commits to any git dir on the server
  POST /api/ivy                   — calls OpenClaw on behalf of the server
  POST /api/control/auto-continue — writes /tmp sentinel files
  POST /api/control/focus-tab     — switches Zellij tabs
  POST /api/control/merge-prompts — calls Groq/OpenClaw
  POST /api/control/dispatch      — calls Groq

All now require getApiUserId() (accepts cookie session + daemon token
+ ck_* agent tokens), consistent with the rest of the fleet API.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 04:01:39 +02:00
g-butandClaude Sonnet 4.6 4bd8641cd3 fix(security): gate cron write endpoints behind auth
POST /api/crons, PATCH /api/crons, and POST /api/crons/run were
excluded from the auth middleware (so the daemon can GET job configs
without a session) but had no in-handler auth checks, leaving them
open to unauthenticated job creation, modification, and execution.

Uses getApiUserId() so daemon bearer tokens remain valid for these ops.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 03:46:25 +02:00
g-butandClaude Sonnet 4.6 c95c36081e fix(control): suppress profile-add and remove controls for org team projects
Org members see team-owner projects in the control fleet view but cannot
write to the owner's entity project or user-project rows (ownership-gated
APIs return 404). QuickProfileForm and RemoveSection were showing for
team projects with no profile, leading to confusing "Failed to save /
remove" errors when clicked.

Fix:
- Add readonly?: boolean to ProjectState type
- Set readonly: true for team-project entries in GET /api/control
- Gate QuickProfileForm behind !project.readonly
- Gate RemoveSection behind !project.readonly

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 03:29:07 +02:00
g-butandClaude Sonnet 4.6 458494626e fix(middleware): exclude Stripe webhook from auth gate
Stripe's webhook POSTs carry no session cookie — the auth middleware was
returning 401 before the route handler's Stripe-Signature verification ran,
silently dropping all billing events (subscription created, cancelled, etc.).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 02:52:28 +02:00
g-butandClaude Sonnet 4.6 fb433e5b13 fix(middleware): exclude token-scoped invitation API from auth gate
/api/invitations/[token] (validate) and /api/invitations/[token]/accept
were not excluded from the middleware, causing unauthenticated invitation
recipients to receive a 401 before the route handler ran. The trailing-slash
exclusion (api/invitations/) covers only token sub-routes; the root
GET/POST /api/invitations (list/create) stays protected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 02:44:44 +02:00
g-butandClaude Sonnet 4.6 97882ce314 fix(projects): suppress job toggle and new-job form in prompts tab for org-member viewers
Extends the readonly gating from the previous commit to the Prompts tab:
org members can read linked autopilot jobs but cannot toggle them or create
new ones for a project they don't own.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 02:39:31 +02:00
g-butandClaude Sonnet 4.6 f6299236f6 fix(projects): suppress all edit/delete controls in detail drawer for org-member viewers
Org members opening a team owner's project detail were silently getting 404
on every PATCH/DELETE because those routes are ownership-gated. Now the API
surfaces readonly=true when the viewer doesn't own the project, and every
edit control (name, description, status, maturity, attrs, add-attr, log-activity,
delete) is suppressed or rendered as non-interactive text for read-only views.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 02:34:22 +02:00
g-butandClaude Sonnet 4.6 4c6ab23558 feat(projects): allow org members to view owner entity profiles in detail drawer
Previously, org project cards on /projects were non-clickable and "View Project"
in the prompts RunModal was suppressed because the detail API scoped by userId,
returning 404 for any project the viewer didn't own.

Added resolveProjectDetailWithOrgFallback() that verifies shared org membership
then fetches the detail under the owner's userId. The GET /api/projects/[id]
handler now falls back to this when the direct ownership check fails.

Cards and "View Project" are fully re-enabled. PATCH/DELETE still require
ownership and correctly return 404 for non-owned entities.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 02:13:34 +02:00
g-butandClaude Sonnet 4.6 cbea35b847 fix(prompts): include org projects in prompt template project picker
Team members saw an empty project dropdown in the RunModal when running
project-scoped prompt templates. Now fetches own + org entity projects in
parallel. Org projects are marked readonly so the 'View Project' button
(which would hang — detail API scopes by userId) is suppressed for them.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 02:05:52 +02:00
g-butandClaude Sonnet 4.6 466dda5e5a fix(agent): apply same ANSI+session-list stripping to applyToOpenTabs tab discovery
The applyToOpenTabs helper in /api/control/agent duplicated the raw
query-tab-names call that was fixed in getZellijTabs (9c6df29). Without
the fix, stale ZELLIJ_SESSION_NAME caused query-tab-names to emit session
list entries with ANSI codes, which never matched any project tab name —
silently marking all tabs as "skipped" when switching agent models.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 01:58:27 +02:00
g-butandClaude Sonnet 4.6 31c0a9060e feat(projects): surface team owner's entity projects to org members
Team members landing on /projects saw an empty page despite having org project
access in the control panel. Now fetches both own projects and org peers'
entity profiles in parallel. Org projects render with a 'team' kicker badge
and are read-only (no inline edit, no delete, no detail drawer).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 01:49:37 +02:00
g-butandClaude Sonnet 4.6 e7d255b742 fix(today): hide first-run banner for team members with org project access
Team members who belong to an org already have projects accessible in the
control panel. The "Register your first project" prompt was incorrectly shown
to any user with no personal projects, including invited members. Now checks
both own projects and org projects before showing the banner.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 01:40:20 +02:00
g-butandClaude Sonnet 4.6 4424e4a9fa fix(onboarding): skip project step for team members who already have org access
Team members invited to an org already have projects shared with them.
Showing "Add your first project" was confusing — this detects org membership
after the username step and routes them directly to /today instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 01:34:25 +02:00
g-butandClaude Sonnet 4.6 0e68246d4f fix(control): remove dbProjects from shared git cache to prevent cross-user contamination
dbProjects (per-user entity projects) was stored in the module-level SlowCache
keyed by dirsKey. When a member user built the cache first (dbProjects=[]),
the owner's subsequent request hit the same dirsKey and got empty profiles
despite having their own entity projects. Now all user-specific project data
is fetched per-request in the existing Promise.all alongside teamOwnerIds,
so each user always resolves against their own + team owners' entity projects.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 01:23:14 +02:00
g-butandClaude Sonnet 4.6 fcc2de3cba fix(control): fetch team owners' entity projects so members see profile data
Members viewing team project cards always got profile:{description:'',status:''}
because dbProjects only contained the requesting user's own entity projects —
empty for org members. Now teamOwnerIds' projects are fetched in the same
Promise.all and merged, giving member users the same profile visibility as owners.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 01:10:23 +02:00
g-butandClaude Sonnet 4.6 9c6df290e3 fix(zellij): strip ANSI codes and session-list lines from getZellijTabs output
When called from the production server process, zellij action query-tab-names
emits session-list output with ANSI colour codes instead of bare tab names.
Strip escape sequences and drop "[Created ...]" lines so the tab-name check
passes correctly and inject reaches the target pane.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 00:45:32 +02:00
g-butandClaude Sonnet 4.6 78d7d7b3a2 fix(control): always fetch on mount regardless of tab visibility
The initial poll() checked document.hidden before fetching, so the
control panel stayed stuck in skeleton state when a tab was backgrounded
(e.g. opened in background, browser automation). Now the first fetch
always fires; subsequent interval/visibility polls still skip when
hidden to avoid unnecessary background requests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 00:21:00 +02:00
g-butandClaude Sonnet 4.6 cf25ccee48 fix(stream): include team projects in SSE stream for members
Members were only receiving live-state updates for own projects;
org-peer team projects were missing from the watched tab list.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 23:20:01 +02:00
g-butandClaude Sonnet 4.6 ce78cf9ce4 fix(inject): allow members to dispatch to team projects
/api/inject was gating on own-projects only; a member dispatching to an
org-peer project got a 404 "Unknown tab". Now falls back to getOrgProjects
so team project tabs resolve correctly. DB events are still recorded under
the dispatching member's userId.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 23:16:53 +02:00
g-butandClaude Sonnet 4.6 44ded77127 feat(control): surface team projects for org members
Include org-peer projects in the Control panel so members can dispatch
agents to the owner's projects. Own projects take precedence on tab-name
collision; DB session states are fetched from each team owner's userId so
progress is visible regardless of who last ran the agent.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 23:10:16 +02:00
g-butandClaude Sonnet 4.6 fd4a39f17c feat(teams): surface org team projects in Settings for members
getOrgProjects previously queried by orgId on the project row, but no
projects had orgId set so it always returned empty. Fixed to query via
org membership user IDs instead — works with all existing data.

createUserProject now auto-sets orgId to the user's primary org so future
projects are org-linked at creation time.

Settings page fetches both own and team projects in parallel and renders
a read-only "Team projects" section below the user's own list. Members
can now see the fleet of projects they have access to dispatch agents on.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 22:57:53 +02:00
g-butandClaude Sonnet 4.6 4af27c3157 fix(invite): collect email on open-link invites so users can sign back in
Without an email on the invite, accepted users had email=null and no way
to authenticate after their initial session expired. Now open-link accept
forms require an email field; email-targeted invites keep the pre-filled
(disabled) display. Passed email flows through the API into acceptInvitation
which prefers invite.email and falls back to the user-supplied value.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 22:34:53 +02:00
g-butandClaude Sonnet 4.6 b1033a5eb7 fix(beacon): remove ThemeToggle from popup; expand smoke to 39 routes
Transient popup windows should not control app-wide theme — removing
ThemeToggle from the beacon header prevents the next session from
waking up in light mode when the user clicked the toggle there.

Smoke test gains /api/orgs, /api/agent-tokens, /api/agent/register
(all three new multi-tenancy + agent-token endpoints).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 21:34:08 +02:00
g-butandClaude Sonnet 4.6 7f1d229ca6 fix(settings): load existing agent tokens on mount; fix unused params
- AgentTokenSettings: fetch GET /api/agent-tokens on mount to populate list
- agent/register: remove unused NextRequest import/param
- agent-tokens/route: suppress intentional token omission lint warning

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 21:16:31 +02:00
g-butandClaude Sonnet 4.6 1916b65e09 feat(agent): /api/agent/register endpoint + middleware bearer token passthrough
- /api/agent/register GET: validates ck_* token, returns user + org context for CLI init
- auth.config: pass Bearer ck_* requests through middleware without session (routes auth themselves)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 21:12:41 +02:00
g-butandClaude Sonnet 4.6 c9977e63a5 feat(agent-tokens): per-device DB tokens for CLI auth (ck_* bearer tokens)
- agent_tokens table: token, label, userId, orgId, lastUsedAt, expiresAt
- /api/agent-tokens GET/POST/DELETE: list/create/revoke tokens (plaintext shown once on creation)
- Settings > Agent Tokens: UI to generate tokens and paste into npx @cockpit/agent init
- daemon-auth.ts: getBearerUserId checks env token then ck_* DB tokens
- session.ts: getApiUserId() — unified auth for API routes (cookie session + bearer fallback)
- control/commands, control/commands/[id], control/runtime-state, sessions: migrated to getApiUserId

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 21:07:59 +02:00
g-butandClaude Sonnet 4.6 7fbf1d758f feat(multi-tenancy): org-scoped project visibility + team members UI
- /api/orgs GET: returns all orgs the user belongs to with full member list
- TeamSettings: shows current members (avatar, name, role) before invite form
- getOrgProjects(): query for active projects shared via org (other members' projects)
- invitations.acceptInvitation: atomically adds new user to inviter's org on accept
- orgs.ts: getOwnerOrgId helper

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 20:53:37 +02:00
g-butandClaude Sonnet 4.6 f0f1e3e455 chore: remove unused 'and' import in orgs queries
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 19:09:32 +02:00
g-butandClaude Sonnet 4.6 3d52e2dbf0 feat(multi-tenancy): add orgs + memberships; make auto-continue opt-in
- New orgs and org_memberships tables (Drizzle schema + raw DDL applied)
- org_id FK added to user_projects and orchestration_runs for team scoping
- Org auto-create on sign-in: every new user gets a personal org; backfilled existing user
- db/queries/orgs.ts: getOrgMembershipCount, createPersonalOrg, getOrgsByUserId, addOrgMember
- Auto-continue now defaults to false (was true); beacon popup no longer force-enables it on mount — auto-inject is fully opt-in, preventing interference with in-progress multi-step plans

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 19:06:21 +02:00
g-butandClaude Sonnet 4.6 29a1fee3e5 feat(onboarding): GitHub repo picker — replace manual form with one-click repo selection
Adds /api/github/repos that reads the stored OAuth access_token and
fetches the user's 50 most-recently-updated non-fork repos from GitHub.
Onboarding step 2 shows a scrollable visual picker with language badges,
star counts, and descriptions. Selecting a repo fills name + gitUrl
automatically. Manual entry is still available as a fallback ("Enter
details manually instead"). Users who signed up with email/password see
the original form unchanged (hasGithub: false path).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 18:46:14 +02:00
g-butandClaude Sonnet 4.6 fdd0fd82ca style(beacon): restyle popup to match Cockpit card/tile design language
- Root surface: bg-surface-page → bg-surface-base so the popup window
  IS the card, not a page containing a card
- Header: rewritten using ui-card-header / ui-card-header-main /
  ui-card-actions with the status-dot + project-name + tag pattern
  from ProjectTile
- Primary prompt button: ui-btn-primary (white) → ui-btn-ready-primary
  (accent) to match the control panel ready-banner style
- Section divider: border-t border-border-subtle separates header from
  body, consistent with card section pattern
- Submitted state: same card surface + header, no separate full-page wrapper
- Dismiss button: ui-link-muted → ui-btn-ghost for system consistency
- Loading / standby states: bg-surface-page → bg-surface-base

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 18:38:56 +02:00