Commit Graph
392 Commits
Author SHA1 Message Date
ZacharyZhang-NY 61aba41e77 refactor(renderer): rename EntityWorkspace to TwoPaneLayout for clarity 2026-04-16 23:33:55 -04:00
ZacharyZhang-NY 933fcf27d0 refactor(runs): extract useRunLogs hook from RunCenter
RunCenter had three useEffects juggling log-chunk loading, tailing, and
older-chunk fetches. Move the whole lifecycle into useRunLogs, which
uses a single effect + AbortController to scope every IPC call to the
current run and pauses polling while document.hidden.
2026-04-16 23:32:02 -04:00
ZacharyZhang-NY 0c9d8269c1 refactor(dashboard): consolidate BudgetAlertBanner dual source into helper 2026-04-16 23:31:58 -04:00
ZacharyZhang-NY c6935ff983 refactor(ui): move AttentionRow to ui and reuse in Inbox 2026-04-16 23:29:58 -04:00
ZacharyZhang-NY 279af3b034 refactor(database): expose domain modules as public readonly fields
Changes the AppDatabaseBase module slots (tasks, agents, runs, ...)
from protected to public readonly so new call sites can reach them
directly as db.tasks.x / db.agents.x. The 156 pass-through methods on
AppDatabase remain untouched, so all existing callers keep working;
this is the first step of a two-part migration to eventually drop
the pass-through layer.
2026-04-16 23:29:07 -04:00
ZacharyZhang-NY 736cff9371 refactor(titlebar): replace hand-drawn restored-window SVG with Phosphor Copy icon
P3-56 (renderer): the maximized-state button used a custom 3-rect SVG to
render the 'restored window' glyph while the minimize and close buttons
used Phosphor icons. Swap the SVG for Phosphor's Copy icon so all three
titlebar buttons share the same icon family and weight, and the visual
bundle no longer carries a one-off raster-like SVG block.
2026-04-16 23:29:04 -04:00
ZacharyZhang-NY 5f147e0b9a refactor(contracts): compose DesktopApi from per-domain sub-interfaces
Split the flat 134-method DesktopApi interface into 12 domain
sub-interfaces (companies, agents, tasks, runs, approvals,
communication, threads, credentials, skills, budget, automation,
window) under src/shared/contracts/desktop-api/. desktop-api.ts
now intersects them to preserve the exact external flat shape;
window.agentCompany consumers and preload wiring are untouched.
2026-04-16 23:28:08 -04:00
ZacharyZhang-NY 0f881097bc docs(snapshot): tag profile-level vs company-scoped fields
Adds an inline comment partition and typed PROFILE_LEVEL_KEYS /
COMPANY_SCOPED_KEYS constants on ProfileSnapshot so callers can
reason about which fields survive a company switch. Shape is
unchanged; renderer consumption is unaffected.
2026-04-16 23:28:04 -04:00
ZacharyZhang-NY 24ea9cff69 refactor(contracts): split schemas-misc into per-domain files
Break the 281-line kitchen-sink schemas-misc.ts into 12 domain modules
(badges, automation, budget, wakeup, config-revisions, run-events,
agent-permissions, heartbeat, runtime-state, threads, participants,
subscriptions). schemas-misc.ts now re-exports the domain barrel so
existing imports keep working. Adds direct exports to contracts.ts for
new code to pull from the narrower modules.
2026-04-16 23:28:00 -04:00
ZacharyZhang-NY 3edb2fc6c1 refactor(main): extract getOrCreateStore in RuntimeBridge
P3-56: three call sites repeated the same 'lookup → fall back to
new → set if missing' dance for session stores. The duplication hid the
fact that the fallback allocation in the second and third sites could
be wasted when the entry already existed. Extract a single
getOrCreateStore helper that does one map lookup, one conditional
construction, and always returns the cached instance.
2026-04-16 23:27:57 -04:00
ZacharyZhang-NY 326bfb3e38 refactor(communication): extract ComposerShell from MessageComposer and TaskDiscussionComposer 2026-04-16 23:27:41 -04:00
ZacharyZhang-NY aa1204babe refactor(organization): extract shared GoalForm and ProjectForm shells
Introduce goal-form/ and project-form/ directories each holding a
single shared shell that handles both create and edit modes via a
discriminated mode prop. The existing GoalCreator/GoalEditor and
ProjectCreator/ProjectEditor become thin wrappers that forward props
to the shared shell, eliminating duplicated state, JSX, and save/
delete handlers across the four files.
2026-04-16 23:27:40 -04:00
ZacharyZhang-NY e892bf3366 refactor(main): simplify escalation trigger map + unify api-section curl guidance
- P3-52: replace 5-deep if-chain in deriveEscalationWakeTrigger with two
  lookup maps (status takes precedence over rule trigger), which removes
  the cognitive overhead of reading the chain and makes the two inputs'
  roles explicit.
- P3-53: rewrite the Windows-only curl warning as platform-neutral
  guidance that matches the surrounding examples. The old text said
  'prefer fetch on Windows' while the doc showed curl POSTs everywhere;
  the new text recommends fetch universally and explains when the curl
  temp-file pattern is needed.
2026-04-16 23:27:29 -04:00
ZacharyZhang-NY 9227e5f7c4 test(e2e): replace fixture-missing early returns with test.skip
3 code paths in desktop.smoke.spec.ts used bare `return` when fixtures
were unavailable (runtime not configured, too few model toggles), which
caused the test to silently pass without exercising the real flow.
Replace with `test.skip(true, reason)` so Playwright reports the skip
and surfaces the missing precondition.
2026-04-16 23:26:35 -04:00
ZacharyZhang-NY 6809fa13af polish: reformat AutomationActivityLog JSX; InlineNotice alert role for actionable warns (P1-20, P3-63) 2026-04-16 23:12:57 -04:00
ZacharyZhang-NY a7ad4e5a8b polish: composite breadcrumb keys; pause run-log polling when tab hidden (P3-58, P3-59) 2026-04-16 23:11:25 -04:00
ZacharyZhang-NY 96ab72472c ConfirmDialog: accept confirmTone/confirmLabel/cancelLabel props (P3-57) 2026-04-16 23:10:48 -04:00
ZacharyZhang-NY 95c9deb778 refactor(useCompanyController): drop eslint-disable comments via getState() in callbacks (P2-24)
setters now read inline via useAppStore.getState() so exhaustive-deps
rule is satisfied without disables; 7 disable comments removed.
2026-04-16 23:10:36 -04:00
ZacharyZhang-NY 4aaf0b8bfe refactor(default-automation-rules): stringify typed config once at seed time 2026-04-16 23:10:32 -04:00
ZacharyZhang-NY ca9b94b5a6 titlebar: await windowMaximize promise instead of setTimeout race (P2-39) 2026-04-16 23:10:19 -04:00
ZacharyZhang-NY 169f5d686c fix(worker-service): exponential backoff + halt after MAX_CRASH_LOOP respawns 2026-04-16 23:09:40 -04:00
ZacharyZhang-NY d8c2e10005 i18n(sidebar): localise company delete confirmation + Yes/No buttons (P3-48)
Delete-company confirmation text now uses sidebar.deleteCompanyConfirm key
with {name} placeholder; Yes/No buttons route through common.yes/no.
2026-04-16 23:09:15 -04:00
ZacharyZhang-NY 3a1f79324d toast: cap message max-height with scroll; assertive role for danger toasts (P2-38, P3-55) 2026-04-16 23:09:11 -04:00
ZacharyZhang-NY cd85419d1d oauth/inbox: use native ordered list; explicit severity fallback (P2-45, P2-48) 2026-04-16 23:08:44 -04:00
ZacharyZhang-NY 2286d70758 fix(worker-service): cancel kill-timer on worker exit; log shutdown failure 2026-04-16 23:08:37 -04:00
ZacharyZhang-NY e54aee8d8b style(App): localise console toggle labels, inline ease via tailwind class (P3-46, P3-47)
aria-label/title now use app.hideConsole/app.showConsole i18n keys; the
grid transition timing function moves from inline style into an
ease-[cubic-bezier(...)] utility.
2026-04-16 23:08:32 -04:00
ZacharyZhang-NY 525f6ed335 fix(window-state): log corruption instead of silent reset to default geometry 2026-04-16 23:08:06 -04:00
ZacharyZhang-NY 1adfea55b0 chore(meetings): log skipped invalid action items; use requireParam for meetingId (P2-42, P3-48) 2026-04-16 23:08:06 -04:00
ZacharyZhang-NY c7fbec8194 fix(schemas): use uuid validation on config-revision schemas (P2-42)
listConfigRevisionsSchema/getConfigRevisionSchema/rollbackConfigRevisionSchema
now require uuid format matching the rest of the config API surface.
2026-04-16 23:07:52 -04:00
ZacharyZhang-NY 7290338b11 composer: unify getAgentInitials; replace invalid focusRingColor with focus:ring-ring (P2-49, P2-32) 2026-04-16 23:07:40 -04:00
ZacharyZhang-NY 5b7e47f461 refactor(vault): expose structured getBackendInfo alongside string label 2026-04-16 23:07:34 -04:00
ZacharyZhang-NY adfcb59978 refactor(task-rubrics): share DEFAULT_RUBRIC between general and code types 2026-04-16 23:07:08 -04:00
ZacharyZhang-NY c47050964a refactor: dedupe heartbeat-title check; JOIN thread visibility; typed skill service guard (P2-43, P2-44, P2-45) 2026-04-16 23:07:01 -04:00
ZacharyZhang-NY 6d0d0dd4a0 lint(eslint): ignore pi-mono-reference and landing directories from lint 2026-04-16 23:06:50 -04:00
ZacharyZhang-NY d019347e03 fix(notification): close visible notifications during destroy on Windows 2026-04-16 23:06:35 -04:00
ZacharyZhang-NY 5da9945792 skills: replace hand-rolled primary button with ActionButton; use Input primitive (P2-33, P2-34) 2026-04-16 23:06:35 -04:00
ZacharyZhang-NY 83dc1e61d7 refactor(message-dispatch): extract priorityToUrgency helper 2026-04-16 23:06:24 -04:00
ZacharyZhang-NY 32e676aec9 fix(automation): allow explicit scheduledAt / scheduleOffsetMinutes
P3-58: Automation rule's schedule_meeting action hardcoded +1hr from
now, producing meetings that could land in the past or outside working
hours. Accept scheduledAt (ISO-8601) first, fall back to
scheduleOffsetMinutes, and only default to +60min when the rule
specifies no time at all.
2026-04-16 23:06:06 -04:00
ZacharyZhang-NY 7eba08cfb9 refactor(ExecutionSections): extract buildTaskEscalation policy from onClick (P2-38)
Move the blocked-vs-strategy approval-type decision out of JSX into a pure
buildTaskEscalation(task) helper so the escalation policy is testable and
not embedded in the click handler.
2026-04-16 23:05:58 -04:00
ZacharyZhang-NY df418a874b refactor(desktop-shell-window): extract webPreferences into a typed local 2026-04-16 23:05:24 -04:00
ZacharyZhang-NY 9e6aa61e09 feat(i18n): dev-mode warn on missing translation keys, default-locale fallback (P3-54)
Missing keys now log a console.warn in dev; at runtime the default-locale
dict is consulted before falling back to the raw key so zh users are not
shown literal keys when a zh translation is absent.
2026-04-16 23:05:20 -04:00
ZacharyZhang-NY 33a371eb50 fix(db): expose runProducedDeliverable on AppDatabase
Follow-up to P2-37: delegation wrapper for the knowledge module method
introduced in the previous commit was missed, leaving TS2339 at
automation-run-completion.
2026-04-16 23:05:06 -04:00
ZacharyZhang-NY dc368962f4 feat(desktop): preserve error.code via DesktopError class in unwrap (P3-52)
Callers can now catch DesktopError and inspect err.code to distinguish
auth/validation/unknown failures; plain Error fallback kept for message.
2026-04-16 23:05:00 -04:00
ZacharyZhang-NY 41fee50c55 EntityWorkspace: normalize typography to match Panel (20px/bold), use Eyebrow primitive (P1-10, P2-27) 2026-04-16 23:04:52 -04:00
ZacharyZhang-NY 972eb5dc93 feat(desktop-shell-menu): allow DevTools toggle via AGENTCOMPANY_ENABLE_DEVTOOLS 2026-04-16 23:04:50 -04:00
ZacharyZhang-NY 84d11582a3 chore(store): use import.meta.env.DEV instead of process.env.NODE_ENV (P3-53)
Vite-native idiom; added vite/client triple-slash reference to env.d.ts
so TS knows about ImportMeta.env.
2026-04-16 23:04:36 -04:00
ZacharyZhang-NY 4fd1326089 fix(browser-manager): await login-window close during shutdown 2026-04-16 23:04:29 -04:00
ZacharyZhang-NY 3bdc8b4be1 refactor(api): extract authenticateRequest helper from handleRequest (P1-35) 2026-04-16 23:04:12 -04:00
ZacharyZhang-NY 779a102ed7 fix(agent-permissions): word-boundary-match management keywords 2026-04-16 23:03:47 -04:00
ZacharyZhang-NY 5ce3c8ff76 refactor(skills): hoist ROLE_SKILL_CATEGORIES to module constant
P2-43: The role → skill-category map was declared inside
assignRoleSkillsToAgent, making every call reallocate the object and
hiding the coupling between these strings and on-disk category names.
Move to a module-level constant with a docblock noting that mixed-case
names (iOS-Dev, Video-maker) must match the filesystem layout.
2026-04-16 23:03:44 -04:00