# Engineering backlog

Proposals awaiting a decision. Delivery status: [Implementation status and handoff](https://fzkuji.github.io/OpenProgram/docs/reference/design/plans/implementation-status.html). Validate each against current source first; remove it once its decision is in its canonical design.

## Frontend state consolidation

Two state paths exist beside the store: untyped `window.dispatchEvent` events, and `apps/web/lib/net/ws/use-ws.ts` rebroadcasting store frames as CustomEvents (`op:dag-nodes`, `op:execution-update`, `op:job-status` and others). Review them together, along with module-level `runtimeState`.

## Repository structure

Intended layering: core (`openprogram/`) at the bottom; the Server (`openprogram/interfaces/server`) and CLI (`openprogram/interfaces/cli`) depend on it, never the reverse.

Open: `site-*` and `repository-*` pages sit loose in `docs/reference/design/`. Proposal: subfolders by area, keeping `nav.py` routing.

## Modules with multiple responsibilities

Re-measure when scheduling. Vendored yoga-layout and ink under `apps/cli/src/runtime/` are out of scope.

- `openprogram/programs/tools/computer_use/computer_use/desktop/macos/`, `windows.py`
- `openprogram/state/store/snapshot/checkpoint/store.py`
- `openprogram/host/security/safe_http.py`
- `apps/desktop/main.js`
- `openprogram/runtime/conversation/process_runner.py`
- `openprogram/programs/applications/browser/pages.py`
- `openprogram/interfaces/server/routes/catalog/programs.py`
- `openprogram/programs/_host/runtime.py`

## Regression review checklist

To verify, not a claim that anything is broken. Reproduce against current source and the public UI before opening a task; record completion in the canonical design.

| Area | Behavior to verify | Source or entry |
| --- | --- | --- |
| Command delivery | A closed WebSocket neither counts as success nor clears the draft | `wsSend`, composer submit |
| Slash commands | Opening `/` does not run compact; missing `/skill` names and `/task` prompts are rejected with feedback | `slash-commands.ts` |
| Command menu | Closing animation neither consumes Return nor blocks history Up/Down; required arguments stay editable | `selectSlashCommand`, composer key handlers |
| Session requirement | Commands without a session give feedback instead of clearing input | Composer, slash commands |
| Compaction | Busy, suggested, completed, failed and no-op are visible; reactive events get UI feedback | `loop_runner.py`, `reactive.py`, `chat-handlers.ts` |
| Context history | Compaction keeps old turns and the DAG head; summary expansion verified visibly | Context details, transcript |
| Help and doctor | Help exposes and focuses the command menu; doctor presents a result with and without a session | `/help`, `/doctor` |
| Overlapping controls | Jump-to-latest and slash menu usable where they are; observe, not inferred from z-index | Chat UI |
| Attachments | Unsupported or oversized files give explicit feedback | `image-attach.ts` |
| Desktop startup | Window appears at its layout, not resizing from the corner | Installed desktop App |
| CLI resume | Argument reaches the Ink runtime with the intended session | `openprogram/interfaces/cli/ink.py`, `apps/cli/src/index.tsx` |
| SSO, speech, plugin isolation | Docs separate implemented methods and providers from unimplemented entries; community plugin execution matches its isolation contract | `models/auth/methods/sso.py`, `interfaces/speech/tts.py`, plugin loader |
| Function recovery | Same-frame resume differs from a sibling retry; indirect cycles follow the recursion policy | `ws_actions/chat/retry.py`, `agent/call_state.py` |
| Function metadata | Dynamic metadata and literal source declarations follow the form contract | Function forms, metadata docs |
| Distribution | Linux desktop artifacts, upgrade failure recovery, manual workflow publication and sandbox gates match the install docs | Installation, source upgrades, Workflow publishing |
| Command registry | Duplicate names have a defined lookup order and an unambiguous menu | `runCommand`, command menu |

Idle automatic compaction is a product decision, not an assumed bug. Environment-variable discovery does not replace the AuthStore boundary. External issue counts and old snapshots are not evidence.
