Skip to content

feat(desktop): simplify employee creation configuration (#297) - #331

Merged
PeterGuy326 merged 3 commits into
mainfrom
codex/feat-297-simplify-hire-config
Sep 18, 2026
Merged

PeterGuy326 merged 3 commits into
mainfrom
codex/feat-297-simplify-hire-config

Conversation

@PeterGuy326

@PeterGuy326 PeterGuy326 commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Canonical requirement

This PR delivers the creation-drawer slice of the requirement and the user-requested simplification of employee setup. It does not claim completion of the unrelated recovery or model-catalog slices tracked by the same issue.

What changed

  • Make the create digital employee drawer progressive: Agent and the required basics are visible first; optional Agent drafting and advanced configuration are collapsed until requested.
  • Move avatar, permissions, capabilities, memory, run mode and budget into the existing advanced section while preserving their state, defaults, validation and hire request payload.
  • Keep Agent/report-to/mode selection visibly operable in the drawer with accessible in-surface choice menus.
  • Replace the incorrect WorkBuddy bitmap with the WorkBuddy SVG mark and give the compact Agent icon a more legible 18px presentation.
  • Add English and Chinese catalog entries plus focused regression coverage.

REQ / AC trace

  • REQ-001 / AC-001: the existing creation drawer now reads as one compact hierarchy with a clear basic path and on-demand detail.
  • AC-002: local Electron preview verified the default collapsed state and expanded advanced state without clipped controls in the supported desktop window.
  • AC-003: no backend, IPC, schema, dependency or homepage changes; existing defaults, validation, Agent binding, avatar handlers and POST /hire payload remain intact.

File domains

Domain Files
Renderer UI and styling apps/desktop/renderer/src/org/HireDrawer.tsx, apps/desktop/renderer/src/app.css, apps/desktop/renderer/src/roleweave-components.css
Agent identity asset apps/desktop/renderer/src/assets/workbuddy.svg, apps/desktop/renderer/src/turns/engine-icon.tsx
Localization packages/ui/src/locales/en.ts, packages/ui/src/locales/zh.ts
Regression coverage apps/desktop/renderer/test/hire-drawer.test.tsx, apps/desktop/renderer/test/App.test.tsx
Product record CHANGELOG.md

Validation

  • PASS: npm run typecheck:renderer
  • PASS: npm run build:renderer
  • PASS: npm run test:renderer — 53 files, 531 passed
  • PASS: npm run test:desktop-main — 355 passed, 0 failed, 8 skipped
  • PASS: focused hire drawer and CJK gate tests — 6 passed
  • PASS: git diff --check
  • PASS: manual Electron preview — default view keeps drafting and advanced details closed; both sections expand on demand and expose their controls.
  • PASS: npm run security:check; existing report contains 2 moderate @vitest/mocker advisories and recommends a breaking npm audit fix --force.
  • BASELINE BLOCKER: npm run check reaches the existing server Gemini suite and reports 6 failures in apps/server/dist/test/gemini-binary.test.js and gemini-health.test.js on macOS; the failures are temp-path / host-fixture expectations and this PR changes no server files.

Security / docs

  • No credentials, network calls, backend contracts or dependencies were added.
  • No-doc-needed for user documentation: this is a renderer-only interaction refinement; CHANGELOG.md records the shipped behavior.

Limits and rollback

  • CI is the final repository gate; the local full check remains subject to the pre-existing Gemini failures listed above.
  • Rollback is a normal revert of commit 8aa52ba; there is no data migration or persisted-schema change.

Reviewer handoff

  • Check the default cognitive load of the create drawer and the discoverability of the two optional sections.
  • Check keyboard/accessibility behavior of the in-surface choice menus and native details controls.
  • Check that expanding advanced settings does not change the existing hire request semantics.

Latest icon sizing refinement

  • Normalize the shared 18px layout box with optical sizing for Qoder's padded PNG and WorkBuddy's full-bleed SVG, so both have the same visible brand area.
  • PASS: full renderer — 53 files, 531 passed; desktop main — 355 passed, 0 failed, 8 skipped; package layout/safety — 19 passed.
  • PASS: local Electron preview confirmed Qoder and WorkBuddy align to the same visible icon scale in the organization tree.

@Bindy-lbb Bindy-lbb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Reviewed PR #331: feat(desktop): simplify employee creation configuration (#297)

1. Agent Icon Normalization & Optical Scaling

  • Vector Asset & Quality: Replacing workbuddy.png with official workbuddy.svg prevents raster blur on high-DPI displays.
  • Unified 18px Layout Box: Increasing .owb-engine-icon from 14px to 18px matches the typography rhythm and makes compact brand marks legible.
  • Optical Scale Balance:
    • Applying --owb-engine-icon-optical-scale: 1.2 for Qoder compensates for built-in transparent whitespace in its raster canvas.
    • Applying --owb-engine-icon-optical-scale: 0.92 for WorkBuddy prevents its full-bleed SVG from overpowering adjacent marks.
    • Both icons now present equivalent visual weight and area in the tree and selectors.
  • Packaging Integrity: Updating scripts/verify-packaged-app.mjs whitelist to allow SVG assets in assets/ ensures build/staging verification succeeds without false rejections.

2. Progressive Disclosure in Employee Creation Drawer

  • Information Hierarchy: Moving optional Agent role drafting and advanced controls (avatar, permission policies, memory, mode, budget, capabilities) into collapsible <details> elements substantially reduces cognitive load while retaining all defaults, validation, and payload integrity on submission.
  • In-Surface Accessible Choice Menus (HireChoiceSelect): Replacing Ant Design <Select> with dedicated lightweight dropdowns resolves z-index/portal issues inside drawer contexts while maintaining ARIA attributes (aria-haspopup="listbox", aria-expanded, role="listbox", role="option", aria-selected, ESC key listener).
  • Localization: Both English (en.ts) and Chinese (zh.ts) catalogs cleanly cover all new labels and hints (hire.assist*, hire.basic*, hire.advanced*, hire.choiceCurrent).

3. Verification & CI Status

  • npm run typecheck:ui and npm run typecheck:renderer passed with 0 errors.
  • Targeted tests in engine-icon.test.tsx and hire-drawer.test.tsx passed (12/12).
  • git diff --check passed with no formatting anomalies.
  • GitHub Actions CI reports all 11 checks green.

LGTM! Approved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants