Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add shipping next-steps and updated testing runbook
  • Loading branch information
Kevin
Kevin committed Apr 21, 2026
commit c1c42b3914c6545ebdd6d6e161decfbfb620524d
32 changes: 32 additions & 0 deletions NEXT_STEPS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Shipping Next Steps

## Current Status

The multi-account foundation is in place:
- Multiple provider accounts can be connected and switched.
- Model selection now stores `accountKey` in session-local state and recent picks.
- Prompt submit and session compact now enforce the selected account is active.

## Immediate Next Step (P0)

Persist `accountKey` in backend session/user message model metadata so account selection survives full session history restore.

### Implementation Outline

1. Extend backend message/session model payloads to carry optional `accountKey`.
2. Thread `accountKey` through session prompt/command APIs and persistence layer.
3. Regenerate SDK types/clients and update app calls.
4. Restore local session model from backend `accountKey` when replaying session history.
5. Add migration-safe behavior for older messages with no `accountKey`.

## Follow-Up Steps (P1)

1. Add tests for account-aware restore and compact flows.
2. Clean up generated SDK method naming (`accounts2.activate`) if route generation allows.
3. Add a subtle UI indicator in prompt header when a non-default account is selected.

## Ship Exit Criteria For This Track

1. Switching accounts changes provider auth for prompts and compact reliably.
2. Reloading app + reopening session preserves account-specific model selection.
3. `release:gate` and deferred suites in `TESTS.md` pass before final ship.
59 changes: 59 additions & 0 deletions TESTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# TESTS

This repo has a wide test surface. To keep current work unblocked, use this staged plan and run heavier suites later when budget/time is better.

## Stage 1 (Run Now / Cheapest)

Use this as the day-to-day gate:

```bash
bun run release:gate
```

What it covers:
- Workspace typecheck
- App production build (embedded via `packages/opencode/script/build.ts`)
- Native single-target smoke build (`--single --skip-install`)

Feature-targeted fast checks (multi-account/session selection):

```bash
bun --cwd packages/app test src/components/prompt-input/submit.test.ts src/pages/session/session-model-helpers.test.ts
```

## Stage 2 (Deferred Unit Suites)

Run these when we are ready to spend more runtime:

```bash
bun --cwd packages/app test:unit
bun --cwd packages/opencode test
```

## Stage 3 (Deferred CI-Heavy Suites)

Run these when we want near-CI parity:

```bash
bun turbo test:ci
bun --cwd packages/app test:e2e:local
```

## Suggested Order

1. Stage 1 for every PR.
2. Stage 2 before release candidate cut.
3. Stage 3 before final ship or when touching risky cross-platform paths.

## Notes

- Do not use root `bun test` (it intentionally fails by design).
- If Stage 1 passes but Stage 2/3 fails, treat those as release blockers and fix before ship.

## Manual Testing Steps (Multi-Account)

1. Connect two accounts for the same provider (for example `work` and `personal`).
2. Pick a model under account A, send a prompt, and confirm it succeeds.
3. Switch to account B for the same provider, pick the same model, and send a prompt.
4. Run session compact and verify it succeeds under the selected account.
5. Reload app/session and confirm selected provider/model remains valid (account persistence end-to-end is tracked in `NEXT_STEPS.md`).