Repository navigation
Description
Outcome and dependencies
Make connection setup, model choice, compatibility testing and the active inference destination understandable inside the existing Modex interface, without an app redesign.
Parent: #376. Fixture/start prerequisite: accepted #377 (LM-1) contract. Completion dependencies: #378 (LM-2 discovery), #379 (LM-3 native execution), #380 (LM-5 local policy). Delivery group: Local models v1 / Gate B. Priority: P1. Follow the shared execution contract in #376. Fixture work may proceed in parallel, but completion needs actual integration with all three producers.
Context and source entry points
Refresh main, scoped AGENTS.md, current Settings/IPC owners and open PRs. Publication baseline is ec7be578765f9ce54976882853e57ca190252361; do not revert later work. Existing: apps/desktop/src/renderer/components/{Composer,ModelMenu}.tsx, existing Settings host, main/preload/shared IPC and thread/paired-client serializers. Reuse existing themes, components, draft ownership and #273's conversation UI. Proposed: apps/desktop/src/renderer/components/LocalModelsSettings.tsx, apps/desktop/e2e/local-models.spec.ts. No new navigation framework or separate chat store.
Consumes: non-secret profile/model descriptors, qualification evidence, native run identity and main-owned policy. Produces: existing-interface local settings/selection/status flow and safe display/controls for supported paired clients. Renderer capability flags never grant authority.
Implementation steps
- Add Settings → Local models: connect, refresh, inspect connection/model status, remove, and explicitly test a selected model. Refuse removal while a live run depends on the connection until safe. All validation/admission remains in main. Opening settings/refreshing must not start inference, install software or download weights.
- Extend the current model menu with connection grouping, search and exact model identifiers; retain explicitly entered custom IDs. Preserve drafts, attachments, selection and keyboard focus through delayed refreshes. Show endpoint reachability separately from model qualification.
- Render unverified, tested-for-recorded-configuration and unsupported states with concrete reasons. A user-started compatibility test uses the accepted native path and clearly disclosed disposable scope. Do not convert a successful greeting or advertised tools into a coding-ready badge.
- Display inference location separately from the existing Local/Worktree workspace choice and native harness identity. Label a connection to this machine accurately; only claim local execution/offline verification at its actual evidence level. Loopback alone is not a privacy guarantee.
- Enable images, reasoning, structured controls and other options only when supported by the actual combination. Block incompatible attachments before send; do not silently discard bytes. Local sessions are explicitly pinned in v1; cloud Auto cannot select or replace their target.
- Retain existing themes, minimum-window behavior, accessible labels, focus, keyboard navigation and reduced motion. Capture loading/ready/unavailable/unsupported/cancelled states with deterministic fixtures; do not hide failed qualification behind a neutral empty state.
- Paired desktops/phones display the host doing inference rather than implying on-phone execution. Reuse the delivered companion/request broker and main-owned policy. Older clients receive safe readable/non-actionable fallbacks for unsupported target-changing controls. Full mobile Settings parity is out of scope.
Acceptance criteria
- AC1: through actual controls, a user adds a connection, discovers/selects/tests a model, runs a local task, sees truthful destination/qualification and reconnects without losing the target.
- AC2: unsupported actions have explanations; failed tests, unreachable servers and unknown locality cannot appear ready or offline-verified.
- AC3: switching threads/profiles during delayed refresh preserves drafts/attachments and cannot silently swap model/endpoint.
- AC4: keyboard/minimum-window flows work in real Electron; screenshots and behavioral tests cover loading, ready, unavailable, unsupported and cancelled states. Human screen-reader checks remain separately recorded.
- AC5: desktop and supported paired clients agree on host/model provenance while credentials stay in main. Forged/stale controls cannot bypass producer policy.
- AC6: existing cloud model selection, Local/Worktree controls and conversation behavior remain intact; no unrelated navigation redesign is introduced.
Verification and handoff
Start with failing model-picker/settings/race tests through existing Electron fixtures and actual main/IPC. Run focused UI tests, then pnpm build && pnpm test and pnpm test:e2e. Inspect screenshots rather than accepting goldens blindly. Record SHA, viewport/theme, exact results, separate mock/native/human gates and accepted producer versions. Update status and dated review evidence. No merge/release/default activation.
Long-running goal prompt
Implement LM-4 in TypeSafeAI/modex under #376 using #377's contract and #378/#379/#380 producers. Read current AGENTS.md, source and open PRs; verify main and owned worktree. Fixture work may start after #377, but do not claim completion without live producer integration. Extend existing Settings, Composer and ModelMenu. Keep connection health, tested compatibility, workspace location, inference host and harness distinct. Preserve drafts, attachments, focus, themes and main-owned authority. Use failing-first UI/race tests, inspect real Electron states, run targeted/full checks and prepare signed reviewable commits with status/evidence updates. Checkpoint exact SHAs, results, versions, remaining native/human gates and one next action. No merge, release, global settings changes, downloads or unrelated redesign.
Follow-up / resume prompt
Resume LM-4 from current issue/PR and checkpoint. Verify ownership, actual diff and accepted producer contracts. Walk the actual connection-to-task flow, then delay refresh while switching threads/profiles. Check draft/attachment preservation, unsupported options, local-versus-worktree wording, inference evidence, keyboard access and older-client fallback. Fix one acceptance gap without redesigning navigation or duplicating main policy. Rerun smoke/full checks and inspect screenshots; distinguish fixtures from native/human evidence. Update criterion receipts and leave unrun gates open. No merge, publication or scope expansion.
Activity
BunsDev commentedon Oct 23, 2026
Refreshed goal prompts — 2026-10-23 (
mainat203a350)On
mainalready:local-modelscode, nodocs/local-models.mdand no LM entry indocs/status.md;Composer.tsx,ModelMenu.tsxandSettingsDialog.tsxinapps/desktop/src/renderer/components/;collaborationMode.settings.modelmust never retarget a local run.Still open:
shared/local-models.ts,docs/local-models.md) and the Codex 0.163.0 / Strata native probe are commit048d1e8on the locallm1-contractbranch. It is not pushed, has no PR and Gate A is not accepted. Fixture work here starts only after that.local-models:commandIPC channel, with no UI. CI is green at3654053. A local review (not on GitHub) found two defects: a failed profile write leaves a changed token under the old revision, and model metadata can echo the saved token into IPC.lm3-isolationholds only a prerequisite-audit commit (665c095), and nothing exists for LM-5.Local worktrees
lm1-contract,lm2-discovery,lm3-isolationandlm-foundationare claimed by other sessions. Don't adopt or edit them.lm-foundationholds uncommitted LM review and design notes.Long-running goal prompt
Follow-up / resume prompt
docs: add the LM-4 design brief and Val's local models decision record (
BunsDev commentedon Nov 12, 2026
Reconciled two independent requirements against protected main
0f43631dec22db5ca9390e35613a139ae61bff07: implementation step S4 and AC6. This advances #381 to two of 13 boxes; the issue and the other eleven boxes remain open.Independent full-criterion audit found concrete remaining implementation work: the model menu has no search; Settings/main have no user-started native compatibility-test command, qualification evidence store or tested/failed-state consumer; the phone thread serializer lacks model and inference-host provenance. Delayed metadata-refresh/thread/profile/attachment/focus coverage, the complete local-model keyboard/minimum-window/state matrix, older-client presentation and human acceptance also remain incomplete. Normal product execution remains unadmitted; scripted transport and disposable native bootstrap evidence do not complete AC1. These gaps are implementation and acceptance work, not waived requirements.
BunsDev commentedon Nov 12, 2026
S2 and AC3 literal-clause reconciliation: both UI/race criteria are now supported on signed main
558b54f8fa0cb3679852c6ece2b07e23a3b10ffb, tree3ba66a4, after protected #499, #502 and #503 delivery. An independent audit checked the full text against production wiring, canonical tests, actual queue logs and retained receipts. This supports only these two boxes; it does not complete #381 or admit local execution.ModelMenu.tsxfilters connection labels/origins/model IDs while rendering original opaque IDs and connection groups. Production-main/IPCmodel-search.spec.tscovers mixed-case exact IDs, groups, delayed results, no-match and keyboard query editing.local-models.spec.tsand manual-visibility units retain explicit custom IDs after metadata failure without admitting execution; unreadable-credential and rejected-IPC cases instead prevent descriptor reconstruction.local-model-preservation.spec.tsholds Alpha metadata while switching between cloud and Beta threads, then verifies both exact multiline drafts, unchanged staged PNG bytes, composer selection 1–5, search selection 0–4 and search focus, empty transcripts and zero sampled coding/send/retry calls.local-model-profile-revision.spec.tsverifies unsaved name/custom-ID fields and name selection 0–3 survive positively delivered metadata. The normal production picker case separately preserves query/focus/raw draft while unadmitted.Search delivery #502, preservation delivery #503, and actual queue run. The latter passed attempt 1 with 2,478 unit passes/36 skips, 522 desktop passes/eight skips and seven site passes, zero failures/cancellations or observed retries. Both canonical preservation receipts name actual checkout
558b54f8, return from app close and report all four sampled coding/send/retry counters as zero. Independent full-clause audit SHA-256:2ad4118f4a68b125d109c234ca03d9fec18c6edc2fb39e4f4c2ec5967030fd55.Limits remain explicit: the admitted target setup in the two preservation fixtures is synthetic; it is not production admission or native inference. Endpoint supersession cancels the old HTTP response before its exact main request completes stale, so it does not prove rejection of a delivered late body. The preserved selection failure also reproduced before metadata delivery and was corrected by establishing the intended initial range, without weakening the before/after assertions. Compatibility-test/qualification controls, tested-state persistence, full keyboard/minimum-window matrix, paired host/model provenance, producer integration and human/native/device acceptance retain their own requirements. Only S2 and AC3 are checked; all other issue states remain unchanged.
BunsDev commentedon Nov 12, 2026
S5 literal safety acceptance
The complete S5 safety requirement is supported on protected main
5a580d4f98f5b1c62c5801db4400d5b533634082. Unsupported features remain restricted; this clause does not require positively qualifying image, reasoning, Plan or structured-output support.Evidence: production Composer, native option/refusal tests, runner pinning/forgery tests, and protected preservation queue. Independent remaining-clause audit SHA-256:
416d35f9c32eeb5dfbae4dbe827fa192c64abccf4856d9a45d6b6ae2f454e62e.Only S5 advances, from four to five of 13 boxes. Compatibility-test/result UI, ordinary producer integration/admission, full qualification/state/theme/keyboard/minimum-window coverage and paired host/model provenance remain open. Fixture/native-adapter guards do not activate production local inference or qualify any actual model.