Skip to content

feat: compare Maka and Pi agent in headless Harbor - #78

Closed
Astro-Han wants to merge 1695 commits into
mainfrom
codex/pi-agent-headless-smoke
Closed

feat: compare Maka and Pi agent in headless Harbor#78
Astro-Han wants to merge 1695 commits into
mainfrom
codex/pi-agent-headless-smoke

Conversation

@Astro-Han

@Astro-Han Astro-Han commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a pi-agent headless backend bridge that maps Pi JSON-mode output into Maka runtime events and token usage
  • allow Harbor cells to run Pi through the in-repo adapter, using a preinstalled Pi CLI selected by MAKA_PI_COMMAND and secret-file API key passthrough
  • keep Pi-specific provider/model strings out of the AI SDK provider parser
  • inline the only production Pi backend registration path inside Harbor cell wiring so backends.ts stays fake-only internal plumbing
  • make Harbor cell config construction an explicit backend switch with non-empty pi-agent and fake slugs
  • cover the Pi transport, Harbor env entrypoint, adapter wiring, and runtime backend behavior with focused tests

Review fixes

  • Pi transport now emits tool calls only from toolcall_end and tool results only from message_end, so runtime traces keep final args/results instead of partial start payloads.
  • MAKA_BACKEND=pi-agent no longer parses MAKA_MODEL through Maka's AI SDK provider whitelist.
  • Harbor adapter no longer runs root-level npm install -g for Pi; benchmark images/specs must provide pi or set MAKA_PI_COMMAND.

Verification

  • npm run -w @maka/runtime test — 590 pass, 0 fail
  • npm run -w @maka/headless test — 211 pass, 0 fail

Real Harbor smoke

Using the same deepseek-v4-pro model and DeepSeek API key for both Maka and Pi:

task Maka Pi result
fix-git $0.000272 $0.001959 both pass
prove-plus-comm $0.000416 $0.003106 both pass
regex-log $0.001036 $0.011134 both pass
cobol-modernization $0.001599 $0.013240 both pass
vulnerable-secret $0.000371 $0.003821 both pass

Across these five scored samples, both harnesses passed 5/5. Pi used about 9x the estimated cost under DeepSeek official deepseek-v4-pro pricing.

filter-js-from-html was excluded from the scored comparison because both agent cells completed but Harbor's Selenium verifier did not finish before the batch run was interrupted.

Note: these real Pi smoke runs used a container setup that made the Pi CLI available. After review hardening, the adapter verifies an existing Pi binary instead of installing it at root during adapter setup.

jackwener and others added 19 commits June 21, 2026 15:56
bundle rounds 13-15 of the 30-round polish loop. Closes the chrome deltas on
the global overlay surfaces (command palette, help modal, toasts) so they pick
up the dense scale used by the rest of the chat surface.

Command palette:
- .maka-palette-input 13 -> 12
- .maka-palette-item icon col 18 -> 16, 12 -> 11, transition 150ms ease-out
- .maka-palette-hint 11 -> 10
- .maka-palette-footer padding 4/10 -> 3/8, 11 -> 10

Help modal:
- .maka-help-body padding 10/14/14 -> 8/12/12, gap 14 -> 10
- .maka-help-section h3 margin 0/0/6 -> 0/0/4, 11 -> 10
- .maka-help-section dl gap 4/12 -> 3/12
- .maka-help-section dt 12 -> 11
- .maka-help-plus 11 -> 10

Toast:
- .maka-toast grid 16 -> 14, gap 8 -> 7, radius 8 -> 7, padding 8/10 -> 7/9
- .maka-toast-copy strong 12 -> 11, small 11 -> 10
- .maka-toast-action radius 6 -> 5, padding 2/8 -> 2/7, 11 -> 10,
  transition 150ms ease-out
- .maka-toast-close 20 -> 18, transition 150ms ease-out
bundle rounds 16-18 of the 30-round polish loop. Closes the chrome deltas on
the inline tool-result surfaces (tool header, diff viewer, terminal output,
load-tool preview) so they pick up the dense scale used elsewhere.

Tool / overlay header:
- .toolInline > header 11 -> 10, margin-bottom 4 -> 3
- .maka-overlay-preview margin 6/0/0 -> 5/0/0, 11 -> 10, max-height 200 -> 180
- .maka-overlay-close min-height 24 -> 22, padding-inline 8 -> 7
- .maka-load-tool-preview margin 6/0/0 -> 5/0/0, padding 6/10 -> 5/8, gap 3 -> 2, 11 -> 10
- .maka-load-tool-footer 12 -> 11

Diff viewer:
- .maka-tool-diff border-radius 10 -> 8
- .maka-tool-diff-paths gap 8 -> 6, padding 6/10 -> 5/8, 11 -> 10
- .maka-tool-diff-body padding 6/0 -> 5/0, max-height 360 -> 320, 12.5 -> 11.5
- .maka-tool-diff-line padding 0/10 -> 0/8

Terminal output:
- .maka-tool-terminal border-radius 10 -> 8
- .maka-tool-terminal-head gap 8 -> 6, padding 6/10 -> 5/8, 11 -> 10
- .maka-tool-terminal-exit padding 1/8 -> 1/6, 10 -> 9
- .maka-tool-terminal-empty padding 10 -> 8, 12 -> 11
- .maka-tool-terminal-stream padding 8/10 -> 6/8, max-height 200 -> 180, 12.5 -> 11.5
- .maka-tool-terminal-truncated-note gap 10 -> 8, padding 8/10 -> 6/8, 12 -> 11
Single tightening pass on the permission dialog chrome so it matches the dense
scale used by the rest of the chat surface. Not part of a larger bundle —
small fix dropped on its own pending WAWQAQ's pivot direction for the bigger
visible structural work.

- .maka-permission-header grid 28 -> 24, gap 10 -> 8
- .maka-permission-icon 28 -> 24, border-radius 8 -> 6
- .maka-permission-age 12 -> 11
- .maka-permission-body gap 12 -> 10
- .maka-permission-summary gap 6 -> 5
- .maka-permission-line 12 -> 11
- .permissionRemember + .credentialField gap 6 -> 5, margin-top 12 -> 10, 13 -> 12
VISIBLE polish — every diff / terminal / load-tool result now lands with a
350ms scale-in (opacity 0 -> 1, scale .97 -> 1, cubic-bezier(.16, 1, .3, 1))
instead of popping in flat. Ported from the upstream reference design's
compact code-output mount keyframes.

- new keyframe @Keyframes maka-tool-card-enter
- applied to .maka-tool-diff, .maka-tool-terminal, .maka-load-tool-preview
- prefers-reduced-motion drops the animation

Counterweight to recent rounds of pure chrome tightening (per WAWQAQ msg
4e5e6450 — micro 1-2px polish reads as "no change"; need motion + structural
changes to register visually).
VISIBLE polish — every chat message (user, assistant, system) now slides up
220ms ease-out (opacity 0 -> 1, translateY 6px -> 0) instead of slamming in.
Streaming deltas, session-switch loads, and new turns all share the same
land-feel.

- new keyframe @Keyframes maka-message-row-enter (matches reference design's
  agents-slide-up cadence)
- applied to .maka-message-row (the article wrapper used by every chat row
  in MessageList)
- prefers-reduced-motion + visual-smoke fixture both drop the animation

Ported from the upstream reference design's chat-mount motion vocabulary.
VISIBLE polish — composer send button now reacts physically on cursor:
hover scales 1.06 with a soft accent-tinted shadow, active press snaps to
scale 0.96 and drops the shadow so the button feels weighty. Cubic-bezier
on transform matches the upstream reference design's button cadence.

- transition: background 150ms / transform 180ms cubic-bezier(.16,1,.3,1) /
  shadow 220ms
- :hover transform scale(1.06) + 0 4px 14px -6px accent-tinted shadow
- :active transform scale(0.96), shadow cleared

Pixel size / fill stay locked at 28x28 black per the existing contract test.
VISIBLE polish — composer toolbar buttons and chips now share the same
hover physics that the send button got in f468b25:

- .maka-composer-tool-button (mic, attach, context+) gets transition cadence
  + :hover scale(1.08) + :active scale(0.94)
- .maka-composer-role-chip / .maka-composer-mode-chip / .maka-composer-model-chip
  pick up the 150ms background/color/border transition so the hover bg shift
  no longer feels instant; border darkens to 0.16 alpha on hover

All four toolbar surfaces now read as one coherent control group with
consistent motion vocabulary.
VISIBLE polish — row surfaces now nudge 2px right on hover, the same gesture
the maka-chat-jump-bottom button uses to telegraph "click me." Keeps the
motion vocabulary coherent across the chat surface.

- .maka-skill-library-row :hover transform translateX(2px) + transition cadence
  on the row itself (180ms cubic-bezier(.16,1,.3,1))
- .maka-onboarding-card :hover transform translateX(2px) (bg alpha stays
  at 0.04 per the locked contract test in localized-main-shell)

Whole composer toolbar + chat list now reads as one consistent motion
system.
VISIBLE polish — the composer streaming-hint dot used to be a single 6px
ping. Replace with a 3-dot bouncing typing indicator (center + ::before +
::after, 4px vertical hop, staggered phases) so the chat reads as actively
"talking back" instead of a single static blip.

- 3 dots at 5x5, 9px apart, staggered animation phases (-0.4s, -0.2s, 0)
- 4px vertical bounce + opacity 0.55 -> 1, 1.05s cycle
- composer-streaming-hint gap 4 -> 8 to give the dots room
- prefers-reduced-motion drops all 3 animations

Also adds 220ms cubic-bezier transition on .maka-composer-inner box-shadow
so the focus ring fades in smoothly instead of snapping.
VISIBLE polish — when an empty-chat / onboarding hero appears (new session,
app boot, blocked state, ready_empty), it now slides up gently instead of
slamming in flat: 320ms cubic-bezier(.16,1,.3,1), opacity 0 -> 1,
translateY 8px -> 0.

- new keyframe @Keyframes maka-hero-enter
- applied to .maka-hero, .emptyChat (legacy alias)
- prefers-reduced-motion + visual-smoke fixture both drop the animation

Ported from the upstream reference design's hero-mount cadence. Completes
the chat surface motion vocabulary: hero lands -> messages slide up ->
tool cards scale in -> composer chips/buttons hover physics -> streaming
indicator types back.
VISIBLE polish — when the model starts extended thinking, the reasoning
panel now slides up gently on mount: 280ms cubic-bezier(.16,1,.3,1),
opacity 0 -> 1, translateY 4px -> 0.

Closes the chat surface entrance vocabulary: hero, message rows, tool
cards, and reasoning panel all share the same land-feel.

- new keyframe @Keyframes maka-reasoning-panel-enter
- applied to .maka-reasoning-panel
- prefers-reduced-motion drops the animation

Final round (30/30) of the WAWQAQ-scheduled polish loop anchored on
msg 8e09de0f.
icon.png shipped as a 1254² full-bleed image (artwork edge-to-edge, zero
transparent margin), so macOS rendered it noticeably larger than sibling
dock icons. Regenerate on the standard 1024² canvas with the squircle
scaled to ~80% (824px) and centered, leaving the ~100px transparent
margin macOS expects.

Affects the dev `npm start` dock icon (app.dock.setIcon) and the
BrowserWindow title-bar icon, both of which load assets/icon.png.

Claude-Session: https://claude.ai/code/session_01KtNufPddivogjCYaQijf5t
BIG VISIBLE redesign per WAWQAQ msg 5a461e0c — Skills page and 定时任务 (Plan/
Reminder) page now render as lifted white cards on the gray plate, matching
the upstream reference design's aux-panel signature instead of sitting flat.

Each page shell gets:
- 1px solid var(--border) outline
- 10px border-radius
- soft lift shadow: 0 1px 2px + 0 8px 24px -16px (foreground-tinted)
- generous inner padding (16/18px Skills, 18px Plan)
- 320ms cubic-bezier(.16,1,.3,1) entrance (opacity 0->1, translateY 6->0)

Surfaces touched:
- .maka-skill-library outer container — new card chrome + padding 16/18,
  gap 12 -> 14, page-shell entrance animation
- .maka-plan-shell outer container — new card chrome + padding 18,
  gap 10 -> 12, top padding tightened from clamp(16,3vh,32) to (16,3vh,24)
- new shared @Keyframes maka-page-shell-enter
- prefers-reduced-motion + visual-smoke fixture both drop the animation

This is the structural pivot WAWQAQ asked for: pages no longer read as
flat lists on a flat canvas — they read as composed cards on a plate.
Inner sub-cards (.maka-skill-library-list, individual reminder cards) keep
their existing 1px borders, giving the reference layout's nested card hierarchy.

NOTE: icon test (dist/main/__tests__/localized-main-shell-contract.test.js:341)
is pre-existing red on origin/main after the icon PR #75 merged, unrelated
to this change. Verified by stashing this change and re-running — same red.
)

Reshape the desktop titlebar/cursor UI:

- align the titlebar icon clusters (sidebar header, collapsed strip, workspace
  top-actions) to one vertical baseline via a single source-of-truth var
- adopt the native cursor convention: arrow on controls, hand only on links,
  guarded by a static contract test with an exact `.maka-markdown-link-internal`
  allowlist
- trim the baseline's explanatory comments to one line each

Claude-Session: https://claude.ai/code/session_01VWXzHoyncpGYuwbaDEDizD
…g modal (#80)

The search modal's migration to the Base UI Dialog primitives drifted the
real-window smoke diagnostic's selectors, failing two programmatic checks on a
clean tree. Bind the diagnostic to a stable `maka-dialog-backdrop` hook and
detect the focus trap structurally; drop the dead `.maka-search-modal-backdrop`
rule. All 6 programmatic smoke checks pass.

Claude-Session: https://claude.ai/code/session_01VWXzHoyncpGYuwbaDEDizD
@Astro-Han
Astro-Han force-pushed the codex/pi-agent-headless-smoke branch from 0fc419f to 5fefa1e Compare June 21, 2026 15:53
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.

4 participants