Skip to content

[codex] Add prompt plus menu and submission modes - #93

Closed
brsbl wants to merge 6 commits into
get-bb:mainfrom
brsbl:bb/prompt-plus-menu
Closed

brsbl wants to merge 6 commits into
get-bb:mainfrom
brsbl:bb/prompt-plus-menu

Conversation

@brsbl

@brsbl brsbl commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a Codex-style + composer actions menu to both new-thread and follow-up prompt boxes.

  • Adds Create App..., Skills with provider shortcut hint, Plan mode, Goal mode, and Apps >.
  • Keeps the existing paperclip attachment action outside the new menu on the right-side control path.
  • Reuses the New Tab installed app list data and ResolvedAppIcon rendering for the Apps submenu/drill-in.
  • Adds compact drawer drill-in behavior for Apps and desktop nested submenu overflow handling.
  • Adds typed submission mode metadata, server-boundary defaulting/validation, host command propagation, runtime execution options, and persisted turn request metadata.
  • Implements Codex Plan mode via native collaborationMode and Codex Goal mode via native thread/goal/set|get|clear, including goal notification translation and clearing persistent provider goals when Goal mode is turned off.
  • Keeps Claude Plan/Goal toggles hidden because the current bridge does not expose a typed first-class Plan/Goal command path; Claude still gets the Skills row with /.

Review/QA

  • Ran review gates after the runtime batch, UI integration batch, and S8 stories/coverage batch.
  • S8 review fixes included:
    • create-thread mode validation now uses threadStart support,
    • default turns clear persistent provider goals,
    • compact Plan/Goal rows preserve menuitemcheckbox semantics,
    • Skills selection defers editor focus until after menu close.
  • Visual QA captured:
    • desktop nested Apps submenu,
    • compact Apps drill-in,
    • long app-list overflow,
    • new-thread and follow-up prompt placement with the paperclip retained on the right.

Validation

pnpm exec turbo run typecheck --filter=@bb/domain --filter=@bb/server-contract --filter=@bb/host-daemon-contract --filter=@bb/agent-providers --filter=@bb/agent-runtime --filter=@bb/thread-view --filter=@bb/server --filter=@bb/app
pnpm exec turbo run test --filter=@bb/app -- --run src/views/thread-detail/ThreadDetailPromptArea.test.tsx src/views/thread-detail/threadDetailPromptSubmission.test.ts src/components/promptbox/PromptBoxActionsMenu.test.tsx src/components/promptbox/PromptBoxInternal.test.tsx src/views/RootComposeView.test.tsx src/components/promptbox/NewThreadPromptBox.test.tsx src/components/promptbox/FollowUpPromptBox.test.tsx
pnpm exec turbo run test --filter=@bb/server -- --run test/services/threads/thread-submission-mode.test.ts
pnpm exec turbo run test --filter=@bb/agent-runtime -- --run src/runtime.lifecycle.test.ts src/codex/adapter.test.ts src/claude-code/adapter.test.ts src/pi/adapter.test.ts
pnpm exec turbo run test --filter=@bb/agent-providers -- --run test/catalog.test.ts

Note: local server DB tests initially required rebuilding better-sqlite3 for the checkout's Node runtime; after pnpm --dir node_modules/.pnpm/[email protected]/node_modules/better-sqlite3 run build-release, the server regression passed.

@brsbl

brsbl commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator Author

Final review follow-up pushed in 668387e8e:\n\n- Preserved replay capture submissionMode end to end instead of replaying Plan/Goal captures as default mode.\n- Added legacy manifest defaulting and server route regression coverage.\n- Re-ran final review on the follow-up diff; all reviewers reported no issues.\n\nValidation:\n- pnpm exec turbo run typecheck --filter=@bb/domain --filter=@bb/server-contract --filter=@bb/host-daemon-contract --filter=@bb/agent-providers --filter=@bb/agent-runtime --filter=@bb/thread-view --filter=@bb/host-daemon --filter=@bb/server --filter=@bb/app\n- pnpm exec turbo run test --filter=@bb/app -- --run src/views/thread-detail/ThreadDetailPromptArea.test.tsx src/views/thread-detail/threadDetailPromptSubmission.test.ts src/components/promptbox/PromptBoxActionsMenu.test.tsx src/components/promptbox/PromptBoxInternal.test.tsx src/views/RootComposeView.test.tsx src/components/promptbox/NewThreadPromptBox.test.tsx src/components/promptbox/FollowUpPromptBox.test.tsx\n- pnpm exec turbo run test --filter=@bb/agent-runtime -- --run src/runtime.lifecycle.test.ts src/codex/adapter.test.ts src/claude-code/adapter.test.ts src/pi/adapter.test.ts\n- pnpm exec turbo run test --filter=@bb/replay-capture -- --run test/writer.test.ts\n- pnpm exec turbo run test --filter=@bb/server -- --run test/internal/internal-replay.test.ts\n- pnpm exec turbo run test --filter=@bb/host-daemon-contract -- --run test/contract.test.ts\n- pnpm exec turbo run test --filter=@bb/host-daemon -- --run src/command-dispatch.test.ts test/command/thread-dispatch.test.ts test/command/command-router.test.ts src/command-handlers/replay.test.ts src/workflow-agent-executor.test.ts

@brsbl

brsbl commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator Author

Extensive validation pass completed on latest head b3ca2dadb.

Local verification:

  • pnpm exec turbo run test --force --filter=@bb/agent-runtime — 32 files / 592 tests passed
  • pnpm exec turbo run test --force --filter=@bb/app — 157 files / 1178 tests passed
  • pnpm exec turbo run test --force --filter=@bb/server — 95 files / 746 tests passed
  • pnpm exec turbo run test --force --filter=@bb/host-daemon — 39 files / 426 tests passed
  • pnpm exec turbo run test --force --filter=@bb/domain --filter=@bb/server-contract --filter=@bb/host-daemon-contract --filter=@bb/agent-providers --filter=@bb/thread-view --filter=@bb/replay-capture — all passed
  • pnpm exec turbo run test --force --filter=@bb/db — 29 files / 304 tests passed
  • pnpm exec turbo run test --force --filter=@bb/sdk — 6 files / 93 tests passed
  • pnpm exec turbo run typecheck --force --filter=@bb/db --filter=@bb/domain --filter=@bb/server-contract --filter=@bb/host-daemon-contract --filter=@bb/agent-providers --filter=@bb/agent-runtime --filter=@bb/thread-view --filter=@bb/replay-capture --filter=@bb/host-daemon --filter=@bb/server --filter=@bb/app — passed
  • pnpm exec turbo run typecheck --force --filter=@bb/sdk --filter=@bb/server --filter=@bb/db — passed
  • pnpm exec turbo run lint --force --filter=@bb/app — passed
  • branch-file Prettier check — passed
  • pnpm exec turbo run build --force --filter=@bb/app --filter=@bb/server --filter=@bb/host-daemon — passed
  • pnpm exec turbo run test --force --filter=@bb/server -- --run test/public/app-scaffold-template-drift.test.ts — passed

Smoke:

  • scripts/bb-dev-app current launched branch dev app (http://localhost:16935, server http://localhost:24935, daemon 127.0.0.1:32935).
  • pnpm bb:dev thread spawn --provider codex --permission-mode readonly ... created thr_jv5rzty6dz, reached idle, and timeline showed assistant reply ok.
  • Public API follow-up smoke on the same live Codex thread verified Plan and Goal turn submission modes:
    • Plan turn replied plan smoke ok; stored client/turn/requested had submissionMode.planMode = plan.
    • Goal turn replied goal smoke ok; stored client/turn/requested had submissionMode.goalMode = goal.

Review:

  • Ran final $review slices over app/UI, server/contracts/replay/domain, and daemon/runtime/provider changes: no issues found.
  • Re-ran narrow review over each follow-up CI-fix commit: no issues found.

CI:

  • Latest PR checks are green on b3ca2dadb: main Ubuntu checks passed, package smoke passed on Ubuntu and macOS, version lockstep passed; node compatibility smoke remains intentionally skipped by workflow.

# Conflicts:
#	apps/app/src/components/dialogs/WorkflowRunDialog.stories.tsx
#	apps/app/src/components/promptbox/PromptBoxInternal.test.tsx
#	apps/app/src/components/secondary-panel/NewTabFileSearch.tsx
#	apps/app/src/components/secondary-panel/NewTabPage.test.tsx
#	apps/app/src/components/ui/dropdown-menu.tsx
#	apps/app/src/hooks/queries/thread-queries.test.tsx
#	apps/app/src/hooks/useThreadCreationOptions.ts
#	apps/app/src/test/setup.ts
#	apps/app/src/test/system-provider-test-utils.ts
#	apps/app/src/views/RootComposeView.test.tsx
#	apps/app/src/views/RootComposeView.tsx
#	apps/app/src/views/thread-detail/ThreadDetailPromptArea.tsx
#	apps/app/src/views/thread-detail/ThreadDetailView.tsx
#	apps/host-daemon/src/app.test.ts
#	apps/host-daemon/src/command-dispatch.ts
#	apps/host-daemon/src/command-handlers/replay.test.ts
#	apps/host-daemon/src/workflow-agent-executor.test.ts
#	apps/host-daemon/src/workflow-agent-executor.ts
#	apps/host-daemon/test/command/thread-dispatch.test.ts
#	apps/host-daemon/test/integration/daemon.integration.test.ts
#	apps/server/src/routes/internal-replay.ts
#	apps/server/src/routes/threads/actions.ts
#	apps/server/src/services/threads/app-scaffold-template/source/src/bb-sdk.d.ts
#	apps/server/test/public/public-thread-data.test.ts
#	apps/server/test/public/public-threads.execution-override.test.ts
#	apps/server/test/system/execution-options.test.ts
#	apps/server/test/threads/thread-runtime-config.test.ts
#	apps/server/test/workflows/workflow-run-pending-notifications.test.ts
#	packages/agent-runtime/src/codex/adapter.test.ts
#	packages/agent-runtime/src/codex/adapter.ts
#	packages/agent-runtime/src/runtime.lifecycle.test.ts
#	packages/agent-runtime/src/runtime.ts
#	packages/agent-runtime/src/test/runtime-test-harness.ts
#	packages/domain/src/index.ts
#	packages/host-daemon-contract/src/commands.ts
#	packages/host-daemon-contract/test/contract.test.ts
#	packages/replay-capture/src/reader.ts
#	packages/replay-capture/src/schema.ts
#	packages/replay-capture/src/writer.ts
#	packages/replay-capture/test/writer.test.ts
#	packages/server-contract/src/api-types.ts
#	packages/server-contract/test/contract.test.ts
@brsbl

brsbl commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #194.

@brsbl brsbl closed this Jun 17, 2026
@brsbl

brsbl commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator Author

Replacement PR: #194 (#194).

brsbl added a commit that referenced this pull request Jun 19, 2026
## Summary

This replaces PR #93 with a clean branch from `ymichael/bb:main`.

- Removes tracked `.otto` artifacts and keeps `.otto/` ignored.
- Adds provider-owned composer actions for skills, plan mode, and goal
mode.
- Wires the prompt action menu to provider metadata for new threads and
follow-up composers.
- Updates command insertion so Plan/Goal use provider text, including
`/plan ` and `/goal `, while Skills still inserts `$`.
- Preserves editor focus after keyboard/compact prompt action selection
and keeps provider actions available for environmentless follow-up
composers.

## Review Gates

- Provider/server merge review found missing app fixture propagation;
fixed by the app wiring commit.
- Prompt menu merge review found Plan/Goal could append after an active
`$` token; fixed by `fix(app): replace active command token for prompt
actions`.
- App wiring merge review completed with no implementation issues and no
architectural issues.
- Final PR review found two P2 issues: keyboard-selected prompt actions
could lose editor focus, and environmentless follow-up composers could
lose provider actions. Both were fixed in `fix(app): preserve prompt
action metadata and focus`.

## Validation

Passed:

- `pnpm exec turbo run typecheck --filter=@bb/domain
--filter=@bb/agent-providers --filter=@bb/server --filter=@bb/app`
- `pnpm exec turbo run test --filter=@bb/domain
--filter=@bb/agent-providers`
- `pnpm exec turbo run test --filter=@bb/server --
src/services/threads/provider-command-typeahead.test.ts`
- `pnpm exec turbo run test --filter=@bb/app -- --run
src/components/promptbox/mentions/command-trigger.test.ts
src/hooks/cache-owners/composer-cache-owner.test.ts`
- `pnpm exec turbo run lint --filter=@bb/app`
- `git diff --check`

Blocked locally:

- `pnpm exec turbo run test --filter=@bb/app -- --run
src/components/promptbox/PromptBoxInternal.test.tsx`
- `pnpm exec turbo run test --filter=@bb/app -- --run
src/hooks/useThreadCreationOptions.test.tsx`

Both fail before test import because Vitest cannot resolve `jsdom`. This
checkout already has multiple `@vitest-environment jsdom` app tests and
`@bb/app` does not declare `jsdom` directly.
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.

1 participant