Commit Graph
306 Commits
Author SHA1 Message Date
ZacharyZhang-NY fc47b60d1b refactor(approval-policy): normalize decisionNote into single local 2026-04-16 22:56:34 -04:00
ZacharyZhang-NY 2deaa0d8b8 feat(automation): add per-action zod schemas for config validation
P2-29: JSON.parse(actionConfigJson) with blanket '(config.x as string)'
coerced malformed config to placeholder values silently (e.g. numeric
priority landed as 'medium'). Introduce parseActionConfig(action, json)
backed by per-action zod schemas in automation-action-schemas.ts.
Validation failures throw, surfaced by evaluateAutomationRules' logger
+ execution recorder. Individual case branches keep existing default
semantics for optional fields.
2026-04-16 22:56:18 -04:00
ZacharyZhang-NY 6429c76ac7 fix(run-housekeeping): gate auto knowledge_base writes on task type or department 2026-04-16 22:56:16 -04:00
ZacharyZhang-NY 1b76a51894 perf(useUIController): hoist page/panel transition objects to module scope (P2-32)
Stable refs across renders eliminate unnecessary motion prop diffing.
2026-04-16 22:56:14 -04:00
ZacharyZhang-NY ca936aabe6 dashboard: extract AttentionRow, cap stagger at 8, limit pulse animation to first 2 rows (P1-15, P2-44, P2-47) 2026-04-16 22:56:09 -04:00
ZacharyZhang-NY 0845187672 refactor(sidebar): group nav into sidebarGroups instead of slice(0,3)+slice(3) (P2-27)
Move Core vs Collaborate grouping from implicit array index to explicit
sidebarGroups NavGroup[] structure surfaced from useUIController.
2026-04-16 22:55:58 -04:00
ZacharyZhang-NY 32687033fc build(mac-sign): remove codesign retry loop, let it crash (P3-29) 2026-04-16 22:55:35 -04:00
ZacharyZhang-NY 9a5cdad86e fix(db): use single timestamp in markRefreshed + recordAutomationExecution (P1-23, P3-46) 2026-04-16 22:55:33 -04:00
ZacharyZhang-NY c93b28925b build(postinstall): fail loud when electron name patch errors (P3-28) 2026-04-16 22:55:32 -04:00
ZacharyZhang-NY 08968e8331 build(generate-icons): exit with clear error on non-darwin (P3-27) 2026-04-16 22:55:30 -04:00
ZacharyZhang-NY a2ceba5c33 build(scripts): inline vitest invocation and remove run-vitest wrapper (P3-25) 2026-04-16 22:55:16 -04:00
ZacharyZhang-NY 7ba19fab77 fix(db): validate backup schema version + recover db on restore failure (P1-21, P1-22) 2026-04-16 22:55:05 -04:00
ZacharyZhang-NY 1f660e79b8 build(release-local): derive docker volume name from rootDir hash (P2-22) 2026-04-16 22:55:00 -04:00
ZacharyZhang-NY d154b45741 build(build-desktop): remove EBUSY cleanup retry loop, let it crash (P2-21) 2026-04-16 22:54:57 -04:00
ZacharyZhang-NY ed2f467e4e build(scripts): rename build:all to build:current to match semantics (P2-20) 2026-04-16 22:54:54 -04:00
ZacharyZhang-NY 5feeb96522 fix(browser-manager): enforce 5min per-action timeout with cancellation path 2026-04-16 22:54:53 -04:00
ZacharyZhang-NY b6e1756f1c refactor(CommandPaletteView): extract PaletteResultSection, closeAndReset (P1-23, P3-49, P3-50)
Five near-identical 25-line entity result blocks collapse into one
PaletteResultSection. Extract closeAndReset() callback used in 5 places.
Drop dead fallback: runs.find(...)?.id.slice(0,8) === run.id.slice(0,8).
2026-04-16 22:54:53 -04:00
ZacharyZhang-NY 3c8a593be7 docs(electron-vite): explain why zod is bundled into preload (P2-17) 2026-04-16 22:54:50 -04:00
ZacharyZhang-NY 775b10f46e build(electron-builder): exclude node_modules/pycache/logs from builtin-skills copy (P2-16) 2026-04-16 22:54:47 -04:00
ZacharyZhang-NY 69b1d8b667 security(ipc): add ensureCompanyExists+belongsToCompany guards to operations handlers (P1-20) 2026-04-16 22:54:34 -04:00
ZacharyZhang-NY be0ff5a041 lib(renderer): add safeJson helper; migrate 6 JSON.parse try/catch call sites 2026-04-16 22:54:20 -04:00
ZacharyZhang-NY a07b42e493 refactor(App): extract Shell wrapper for locale+titlebar chrome (P1-20)
Collapse two near-identical LocaleContext/TranslationContext/TitleBar
wrapper blocks into a single Shell component.
2026-04-16 22:53:56 -04:00
ZacharyZhang-NY 3deb1c00ac perf(db): batch skill-words + reports queries for scoreCandidate (P1-18) 2026-04-16 22:53:39 -04:00
ZacharyZhang-NY bb397dff02 refactor(heartbeat): centralize [Heartbeat] prefix as a shared constant
P2-36: Multiple subsystems were string-coupled via the magic
'[Heartbeat]' prefix. Introduce src/main/orchestration/heartbeat-task.ts
as the single source of truth and replace scattered literals in
heartbeat dispatch, automation actions, and run completion.

P3-52: Collapse 5-deep ternary in automation-actions' wake-trigger
selection into lookup helpers (deriveHeartbeatWakeTrigger,
deriveEscalationWakeTrigger).
2026-04-16 22:53:19 -04:00
ZacharyZhang-NY 4838750009 refactor(useDataLoader): drop 16 positional setters, use getState() (P1-22)
Function signature reduced from 16 args to 4; setters sourced from
useAppStore.getState() inside callbacks (stable refs, no deps needed).
useCompanyController no longer has to thread 14 setters through.
2026-04-16 22:53:08 -04:00
ZacharyZhang-NY 12279005fe fix(db): add run_events(run_id,seq) unique index + wrap appendRunEvent in tx (P1-15) 2026-04-16 22:53:06 -04:00
ZacharyZhang-NY 8dfa69cacf refactor(useUIController): group reads via useShallow, fetch setters from getState (P1-17)
Replace 11 individual useAppStore subscriptions with a single useShallow
selector; setters read once from useAppStore.getState() (stable refs).
2026-04-16 22:52:27 -04:00
ZacharyZhang-NY 7f2d028080 fix(updater): only toast 'Up to Date' on manual user-initiated checks 2026-04-16 22:52:16 -04:00
ZacharyZhang-NY bea8aa9542 ui: add Card/Eyebrow/Spinner primitives, iconOnly ActionButton, drop ui.tsx barrel 2026-04-16 22:52:16 -04:00
ZacharyZhang-NY 8867f50b37 refactor(db): consolidate BOARD_READER_ID in helpers + escape backslash in LIKE (P3-50, P1-26) 2026-04-16 22:52:09 -04:00
ZacharyZhang-NY b15f6a1415 chore(npmrc): remove shamefully-hoist workaround (P3-24) 2026-04-16 22:52:05 -04:00
ZacharyZhang-NY 37a57d512c chore(tsconfig): remove orphan tsconfig.base.json (P2-18) 2026-04-16 22:52:01 -04:00
ZacharyZhang-NY 40a1e5af07 chore(scripts): remove dead seed-research-team.ts (P1-14) 2026-04-16 22:51:59 -04:00
ZacharyZhang-NY 796665ceec refactor(release-local): rename hasDocker to hasDockerInstalled (P1-12) 2026-04-16 22:51:56 -04:00
ZacharyZhang-NY 9aa03a0efd lint(eslint): surface no-explicit-any as warn to constrain future code (P1-6) 2026-04-16 22:51:54 -04:00
ZacharyZhang-NY 6c2b229704 docs(readme): drop nonexistent pnpm test:packages from verification (P1-5) 2026-04-16 22:51:51 -04:00
ZacharyZhang-NY e42879bfbe perf(db): push listAgentMessages visibility filter + limit to SQL (P1-17) 2026-04-16 22:51:27 -04:00
ZacharyZhang-NY d42901b86d refactor(renderer): consolidate navigateTo into navigation slice (P1-11)
Delete the useUIController.navigateTo duplicate; augment slice version with
task-with-run lookup (via get().snapshot) so notification-click and command
palette share one codepath. App.tsx now reads navigateTo from the store.
2026-04-16 22:51:26 -04:00
ZacharyZhang-NY 66f5e0923d fix(automation): log no-op status-change calls instead of silently returning
P2-34: Silent no-op guard hid caller bugs. Warn-log the violation so
it shows up in traces; callers should still gate.
2026-04-16 22:51:12 -04:00
ZacharyZhang-NY 4ebd98bb99 fix(automation): surface malformed condition JSON instead of silently returning false
P2-46: Previous bare try/catch hid parse errors, making rules silently
non-firing. Let JSON.parse throw; the caller (evaluateAutomationRules)
already logs and records the failure.
2026-04-16 22:51:00 -04:00
ZacharyZhang-NY 6b391887c3 fix(connector-auth): emit .bat file on Windows instead of '&'-chained script 2026-04-16 22:50:56 -04:00
ZacharyZhang-NY 43a03aa5e9 refactor(db): collapse three markRead variants into markMessageReadForReader (P1-16) 2026-04-16 22:50:40 -04:00
ZacharyZhang-NY 62050c9c05 refactor(automation): use JSON-stringified execution keys
P1-19: Previous string-join with ':' separator could collide when
field values contain colons (e.g. runId='a:b' vs runId='a' + previousStatus='b').
Use JSON.stringify for unambiguous serialization.
2026-04-16 22:50:38 -04:00
ZacharyZhang-NY 2050c0e8fd fix(notification-service): track latest section for batch summary 2026-04-16 22:50:09 -04:00
ZacharyZhang-NY 4ed1e47c32 refactor(desktop-shell-menu): drop dead '?? ""' defense in openPath 2026-04-16 22:49:41 -04:00
ZacharyZhang-NY 1ccf31f6d7 refactor(app-lifecycle): invert window-all-closed for clearer macOS intent 2026-04-16 22:49:30 -04:00
ZacharyZhang-NY 2eb6cb2c06 fix(db): move active runs query into deleteTask transaction (P1-12 TOCTOU) 2026-04-16 22:49:22 -04:00
ZacharyZhang-NY 9874d825b6 refactor(api-server): move agents-standup SQL into db domain methods
Replace the six inline queryAll calls in routes-agents-standup.ts with
typed domain methods: db.agents gains listDirectReportsForStandup and
listReportStatusesForStandup (LEFT JOIN aggregation), db.tasks gains
listAssigneeTasksForStandup and listTasksForAssignees (safe on empty
assignee list), db.approvals gains listAgentPendingApprovals and
listAgentResolvedApprovals. Shared listRecentTaskComments is reused.
2026-04-16 22:39:43 -04:00
ZacharyZhang-NY 4342cf3e2f refactor(api-server): move approvals SQL into db.approvals domain methods
Replace the ad-hoc getApproval helper and the filterable list query
in routes-approvals.ts with db.approvals methods. Add findApprovalById
(non-throwing lookup returning null) and listApprovalsForApi (accepts
requestedByAgentId / relatedTaskId / statuses filters and builds the
prepared statement inside the domain layer).
2026-04-16 22:38:05 -04:00
ZacharyZhang-NY 28296b3d5f refactor(api-server): move agents SQL into db.agents/db.activity/db.approvals methods
Replace seven inline queryAll calls in routes-agents.ts with typed
domain methods. db.agents gains listAgentsForApi, listAgentsForStandup,
listExistingAgentsForHireCheck. db.tasks gains listTasksForStandup.
db.approvals gains listApprovalsForStandup and
listPendingHireApprovalPayloads. db.activity gains listRecentTaskComments
(safe on empty taskIds). All HTTP response projections stay identical.
2026-04-16 22:37:10 -04:00