fix: guide coding model selection before sending
This commit is contained in:
1 parent
f34e651774
commit
bec42627f5
12 files changed
+1000
-101
No files matched your search
@@ -0,0 +1,70 @@
|
||||
# Task: Guide model selection before new coding conversation submission
|
||||
|
||||
## Identity
|
||||
|
||||
- Task ID: 20261014-code-model-onboarding-01e8cbed
|
||||
- Mode: Feature
|
||||
- Branch: codex/20261014-code-model-onboarding-01e8cbed-code-model-onboarding
|
||||
- Worktree: /Users/chillishark/Makelore 麦洛/.codex-worktrees/makelore/20261014-code-model-onboarding-01e8cbed
|
||||
- Base commit: f34e651774beb6a2a213b5711f2ffb887d22d4b7
|
||||
- Owner: codex
|
||||
- Status: Ready for Integration
|
||||
|
||||
## Scope
|
||||
|
||||
- Show model selection as normal preparation before Code conversation submission, including saved new conversations and provisional drafts. Provide direct model choices, preserve drafts/attachments, prevent prompt submission until configured, and retain valid defaults.
|
||||
|
||||
## Intent And Constraints
|
||||
|
||||
- User approved the proposed interaction. Keep the Makelore light visual system, existing provider-qualified model identity and Main prompt/auth validation. Do not auto-send, rewrite project defaults/prompts/Skills, restore conversation settings, change teacher behavior or move/delete user history.
|
||||
- This task implements/tests source only; no running-app update, real model invocation, merge/push or other-worktree cleanup requested.
|
||||
|
||||
## Project Context Loaded
|
||||
|
||||
Task context:
|
||||
- Official feature start/status verified task id01e8cbed, absolute worktree/branch, owner and latest fetched origin/main base f34e651774beb6a2a213b5711f2ffb887d22d4b7. Primary unrelated dirty documents untouched.
|
||||
- All77 peers/231 required sections read/hash checked; no concrete semantic conflict or missing record. Preserve deletion-cleared selection, drafts, hidden metadata and model-independent preview recovery.
|
||||
|
||||
Read:
|
||||
- Read-before-planning, memory-index, own record and AGENTS. Canonical positioning/current-state/decisions/architecture/domain/evidence/reflection/commitments/stale context reused from prior completed same-base tasks; canonical diff remains empty. Relevant ADR006 model resolution and ADR teacher scope rechecked.
|
||||
- Main conversation service/history/Pi preparation, provider/model option stores, sidebar selection/toast path, panel/composer/runtime controls and existing unit/native Electron fixtures.
|
||||
- Design skill and design-system/React UX searches: apply accessible focus/labels/neutral preparation; generic dark/marketing/font recommendations conflict with existing light product and are not applied.
|
||||
|
||||
Relevant understanding:
|
||||
- Opening a missing-model conversation currently prepares Pi, rejects and surfaces both sidebar toast and composer retry. Provisional draft has no selector; current canSend does not validate model.
|
||||
- Main can read persisted history without a model session. Preparing/accepting a real prompt still requires a valid model. Provider initial empty array is not confirmed empty catalog; loading/error must be distinguished.
|
||||
- Files: conversation-service, CodingChatPanel/CodingComposer/runtime controls, provider loading state, focused tests and README. No new model/Provider backend contract or teacher changes.
|
||||
|
||||
Gate result: Passed.
|
||||
|
||||
## Plan
|
||||
|
||||
1. Return read-only conversation history/metadata for unresolved model selection without opening Pi, retaining genuine errors and prompt validation.
|
||||
2. Add neutral preparation guidance with one-level model picker; preserve per-project provisional model choice without creating/sending a conversation until the user sends. Block submit until model saves/refreshes; keep valid defaults and draft/attachments.
|
||||
3. Verify loading/empty/failed catalogs, keyboard selection, error recovery, no auto-send, conversation/project isolation and existing default path through focused units and native Electron screenshots; run typecheck/lint/build and independent review.
|
||||
|
||||
## Outcome
|
||||
|
||||
- Main getSnapshot reads durable history/metadata normally for unresolved models, without preparing Pi. Only known model-selection preparation failures project a required model; persisted old choice remains unchanged. Active/uncertain workers retain runtime authority. Late history re-reads metadata and revalidates changed models, preserving real auth/start/history failures instead of returning stale required state. Prompt/model/provider validation remains unchanged.
|
||||
- Added neutral '选一个模型,开始聊聊' guidance and one-level model menu, separate catalog loading/failed/confirmed-empty states with appropriate refresh/config actions. Provider initialized state distinguishes initial unknown from confirmed empty. A valid Main-resolved default remains usable even if not listed by the narrower picker catalog.
|
||||
- Both saved conversations and provisional drafts can select models. Provisional selection is local and scoped by account/project/agent; it neither creates a conversation nor sends. First manual send creates/persists its selected model before prompt; the created conversation and model mutation are guarded against repeated sends during save/refresh. Existing project default and hidden configuration are preserved.
|
||||
- Input/attachment drafts remain available through selection. First-send text is frozen at the click; newer edits remain as a new draft, including edits while create/save/refresh wait. Successful submit removes only sent attachments. Model save + authoritative refresh clears only the captured draft's model-choice error, without hiding unrelated errors or uncertain work. Same-scope successful keyboard selection restores textarea focus; switching scopes does not steal focus.
|
||||
- Retained entry error codes for precise model-guidance projection, updated README and meaningful unit/native regressions. Independent review's signature, stale-error, draft-intent, catalog-validity and late-history findings were fixed and rechecked; final review approved with no remaining blocker.
|
||||
|
||||
## Verification
|
||||
|
||||
- Pinned pnpm10.33.4 used with existing ignored dependency link. Standard typecheck, scoped ESLint, production Renderer/Main/Preload/utility build and diff check passed. Logs /tmp/makelore-code-model-onboarding-types-01e8cbed.log, /tmp/makelore-code-model-onboarding-lint-01e8cbed.log, /tmp/makelore-code-model-onboarding-build-01e8cbed.log.
|
||||
- 242 related units passed: Main core routes44 (includes deferred-history auth/start race), panel/runtime UI61 (includes A-send/B-draft, catalog-external valid default, save/refresh pending, no auto-send and focus), store/workspace/facade/voice/model-options/work-preview112, provider regressions25. Logs /tmp/code-model-onboarding-units-reviewed-01e8cbed.log, /tmp/makelore-code-model-onboarding-regression-01e8cbed.log, /tmp/makelore-code-model-onboarding-providers-01e8cbed.log; backend agent ran44 after reproducing and fixing the two late-history failures.
|
||||
- Isolated native Electron3/3 passed: removed saved model replacement with keyboard focus, saved missing model with deferred save/refresh and retained text/images, provisional choice without API/create followed by explicit create→model→prompt. No captured prompt on model selection. Root visually inspected direct picker and completed-selection screenshots. Log /tmp/code-model-onboarding-electron-01e8cbed/run.log; screenshots under results/pi-coding-first-chat-missi-0bb00-nishes-without-auto-sending/ in that directory.
|
||||
- Native test generated Main entry restored byte-for-byte, SHA ad83191846f6f9e58fd1f0237a04a90e8e358344f74b89cad5a19b0cbdecdbc9; test app processes exited. Test fixtures use isolated data/fake provider host, not the real trial/account/paid model.
|
||||
- Additional strict Main module-closure check reports one existing TS2322 at unchanged electron/coding-projects/project-service.ts:217 (optional projectId). Running the same strict check directly on that unchanged module reproduces the identical diagnostic; its entire coding-project/shared dependency sources have no base diff. No changed-file diagnostic; this extra check is not declared clean. Logs /tmp/makelore-code-model-onboarding-main-types-01e8cbed.log and /tmp/makelore-code-model-onboarding-unchanged-base-types-01e8cbed.log.
|
||||
- No live app update, real model call, real cloud submission, merge/push, or user-project file changes. Passing local/native fixtures does not constitute installed/real-provider release acceptance.
|
||||
|
||||
## Follow-ups
|
||||
|
||||
- Source ready for integration and temporary-app update when requested. Earlier submission-directory repair0d6ac41 remains on its separate completed task branch; combine both during delivery as appropriate, preserving both README behavior paragraphs. Running trial still uses previous source.
|
||||
- Existing additional strict Main project-service optional-id diagnostic is outside this UI task; keep it visible for future Main typecheck work.
|
||||
|
||||
## Promotion Candidates
|
||||
|
||||
- Target ADR006 and architecture data-flow/module-map: distinguish model-free conversation history/selection preparation from validated Pi execution. Evidence: Main44, UI61, related137 units, native3 and independent review. Future impact: missing model is ordinary preparation, history never causes prompt/model execution, and delayed reads cannot override newer runtime/model state. Conflicts: none with77 peer scopes; prompt/auth/project identity and teacher execution unchanged. Human confirmation: user explicitly authorized this interaction; canonical promotion requires serialized integration.
|
||||
Reference in new issue
Block a user