Commit Graph
345 Commits
Author SHA1 Message Date
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
ZacharyZhang-NY a0e78e27ab perf(db): prefilter agents by mention tokens before alias matching (P1-33) 2026-04-16 23:03:10 -04:00
ZacharyZhang-NY 7100c0bed6 fix(agent-auth): log malformed token shape once for schema-break diagnosis 2026-04-16 23:02:58 -04:00
ZacharyZhang-NY d4c0d0a6bc refactor(db): move run-deliverable detection out of raw db.queryAll
P2-37: automation-run-completion.checkRunProducedDeliverable issued 5
raw SQLs via db.queryAll. Consolidate into db.runProducedDeliverable
so schema changes to knowledge_base / documents / task_comments
surface in the knowledge domain module rather than silently breaking
at the caller.
2026-04-16 23:02:43 -04:00
ZacharyZhang-NY b2eed3e75a fix(budget-policy-input): convert dollars to cents via string parsing (P2-35)
Avoid floating-point drift from parseFloat * 100 by parsing digits then
concatenating; dollarsToCents returns null for invalid input.
2026-04-16 23:02:37 -04:00
ZacharyZhang-NY c3e66d1a3b fix(task-quality-gates): add zh keywords and word-boundary capabilities trim 2026-04-16 23:02:29 -04:00
ZacharyZhang-NY 296c72eb3f composer/settings: use ActionButton iconOnly send; replace deprecated navigator.platform with lib/platform (P1-9, P2-46) 2026-04-16 23:02:29 -04:00
ZacharyZhang-NY b0b0cfa35b refactor(keyboard): extract shared nextIndexFor, drop duplicate handleKeyDown body (P2-28)
createRovingTabIndex and useRovingTabIndex now share one key-to-index
resolver; keeps both exports for test + React usage without drift risk.
2026-04-16 23:02:17 -04:00
ZacharyZhang-NY 821855931d refactor(db): add findAgent/findConnector; wrap linkManyTasksToApproval in tx; collapse saveAgent IIFEs (P1-28, P1-29) 2026-04-16 23:02:13 -04:00
ZacharyZhang-NY a05885c0ff feat(notification): localize batch summary copy for zh locale 2026-04-16 23:01:56 -04:00
ZacharyZhang-NY a063f5ed91 refactor(useCompanyData): extract filterByCompany helper, drop 14 inline filters (P2-34)
One filterByCompany<T>() helper replaces 14 nearly-identical snapshot.X
.filter((item) => !currentCompany || item.companyId === currentCompany.id)
expressions.
2026-04-16 23:01:34 -04:00
ZacharyZhang-NY 5403ee9aa0 fix(approval-handler): only parse workflow payload for dangerous_command type
P1-22: The opportunistic JSON.parse of payloadJson ran for every
approval, hoping to find workflowId/stepId. Gate on the actual
approval type that carries workflow metadata (dangerous_command, as
emitted by runWorkflowPipeline), and validate payload shape via zod.
2026-04-16 23:01:23 -04:00
ZacharyZhang-NY f1dd9786e5 onboarding: remove AsciiAnimation decoration and 'by ELYDORA' signatures (P1-17, P1-18); move hero-drift keyframes to global CSS (P3-60) 2026-04-16 23:01:11 -04:00
ZacharyZhang-NY 527a730bec refactor(build-desktop): split 397-line script into env/config/runner modules (P1-15) 2026-04-16 23:00:54 -04:00
ZacharyZhang-NY b58e64b555 refactor(ConsoleView): hoist Select options into useMemo, name shutdown sentinels, localise close label (P2-25, P2-26, P3-51)
Replace options IIFE with memoised runSelectOptions; extract magic-string
run-summary filters to SHUTDOWN_SUMMARY/WORKER_CRASH_SUMMARY constants;
localise Close console aria-label via console.close key.
2026-04-16 23:00:48 -04:00
ZacharyZhang-NY 7df0d564e5 refactor(workflow): validate workflow steps via zod schema
P1-20: normalizeWorkflowSteps used ad-hoc typeof checks that silently
accepted malformed entries (e.g. number where string was expected).
Replace with workflowStepsInputSchema zod validation; semantics for
defaults/action whitelist are preserved.
2026-04-16 23:00:45 -04:00
ZacharyZhang-NY a0be5beeb5 fix(execution-policy): runtime-assert execution mode from DB instead of cast 2026-04-16 23:00:43 -04:00
ZacharyZhang-NY 007a8fede5 docs(session): explain MAX_HANDOFF_LENGTH/MAX_HANDOFF_RUNS constants 2026-04-16 23:00:18 -04:00
ZacharyZhang-NY a852597d2e refactor(workspace): extract resolveWorkspaceWithLockMode shared helper
P1-21: worker-crash-recovery reinvented workspace resolution inline and
silently dropped the exclusive/shared distinction — a recovered run
could claim shared mode that the original run held exclusively.
Introduce resolve-workspace.ts as the single source of truth for the
task→agent→project→company fallback chain and its lockMode, used by
both run-dispatch and crash recovery.
2026-04-16 23:00:13 -04:00
ZacharyZhang-NY 6ce4fd1fe4 fix(onboarding): log skill scan failures instead of silent swallow 2026-04-16 23:00:06 -04:00
ZacharyZhang-NY 1b11b53f84 onboarding: extract OnboardingStep shell (P1-11); eliminate 6 copies of motion+header chrome 2026-04-16 23:00:01 -04:00
ZacharyZhang-NY 3eb5ed1069 perf(db): fetch single row in getConnector instead of readConnectors+find (P1-27) 2026-04-16 22:59:51 -04:00
ZacharyZhang-NY 17aa92d18d fix(formatters): use active locale for money/time/relative formatting (P2-29, P2-30)
Pull locale from useAppStore.getState() so zh users get zh-CN number/date
formatting and Chinese relative-time strings; drop en-US lock.
2026-04-16 22:59:41 -04:00
ZacharyZhang-NY fcd2cf6e43 fix(host-env): enumerate installed Python versions instead of hardcoding 2026-04-16 22:59:30 -04:00
ZacharyZhang-NY ce676c5cc0 fix(browser): prevent duplicate concurrent login launches per account (P1-14) 2026-04-16 22:59:19 -04:00
ZacharyZhang-NY d9861f6346 refactor(turn-context): extract named filter helpers from buildRunPayload
P1-13: 100-line call to buildTaskPrompt inlined 25 snapshot filters
(meetings, knowledge, documents, approvals, connectors). Extract into
named helpers (filterUpcomingMeetings, filterRelevantKnowledge,
filterRecentDocuments, filterPendingApprovals, buildConnectorCatalog)
so each filter is individually testable and buildRunPayload reads as
a composition.
2026-04-16 22:59:19 -04:00
ZacharyZhang-NY 70d416fa18 fix(connector-auth): expand Linux terminal candidates and honor $TERMINAL 2026-04-16 22:59:06 -04:00
ZacharyZhang-NY 67035d1a8e fix(useDataLoader): cancel in-flight section fetches when company changes (P2-45)
Add currentCompanyId to effect deps so switching company aborts the
previous company's pending inbox/metrics/standup fetches before stale
results can overwrite new state.
2026-04-16 22:58:39 -04:00
ZacharyZhang-NY 83462a4663 refactor(browser-action): extract getApprovalOrNull helper to drop nested try/catch 2026-04-16 22:58:31 -04:00
ZacharyZhang-NY 5d9639ca4a fix(prompt): CEO priority list numbering + drop trailing locale reminder
P2-49: CEO Priority 1 standup list had two '4.' entries followed by
'5.' and '6.'. Renumber to 3/4/5/6/7.

P2-45: Remove the tail 'Language Requirement Reminder' section. The
body of the prompt is English regardless of locale, so appending
'remember Chinese' after 8KB of English made the locale signal less
coherent rather than more. Keep the single up-front locale instruction.
2026-04-16 22:58:15 -04:00
ZacharyZhang-NY 8dbd0867b0 refactor(useCommandPaletteHotkeys): read selectedPaletteIndex from store, drop prop (P2-44)
Remove dual-source: option no longer takes selectedPaletteIndex; all reads
go through useAppStore.getState().selectedPaletteIndex inside the keydown
handler.
2026-04-16 22:58:12 -04:00
ZacharyZhang-NY 2bed06ca64 security(agent-auth): rotate signing key on every launch 2026-04-16 22:58:01 -04:00
ZacharyZhang-NY 2df921ca88 refactor(agents): share leadership role detector, use word-boundary match
P2-23: 'lead' in system-prompt.ts matched 'cleaner' / 'leaderboard' via
substring .includes(). Hoist LEADERSHIP_ROLE_KEYWORDS into a shared
agent-role-helpers.ts module; tokenize input on non-alphanum to require
whole-word match.

P3-54: Same keyword list was duplicated in automation-skills with drift
(missing 'ceo', different members). Both sites now call through the
shared helper.
2026-04-16 22:57:35 -04:00
ZacharyZhang-NY ba6ba8360b docs(budget): clarify policy.amount<=0 disables the rule 2026-04-16 22:57:05 -04:00
ZacharyZhang-NY f468f7c238 fix(prompt): use UTC day-of-week to match UTC date/time stamp
P2-24: now.getDay() returns local time weekday but the stamp reads
'UTC', producing off-by-one-day errors near UTC midnight. Switch to
now.getUTCDay().
2026-04-16 22:56:54 -04:00
ZacharyZhang-NY 0706ad78bb refactor(browser-manager): hoist resolvedRoot out of screenshot filter chain 2026-04-16 22:56:46 -04:00
ZacharyZhang-NY 4000854b69 fix(heartbeat): remove silent-default try/catch around getHeartbeatPolicy
P2-35: The policy row is the gate that decides whether the agent runs;
pretending cooldown is 10s when the read fails hides data corruption.
db.getHeartbeatPolicy already supplies field-level defaults from policy
JSON — and the only reason to throw here is 'agent not found', which
is already impossible because the caller just loaded db.getAgent.
2026-04-16 22:56:43 -04:00
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