feat: redesign coding default entry

This commit is contained in:
inman
2026-09-06 15:07:19 +08:00
parent f8eee430f4
commit de8ce283dd
12 changed files with 334 additions and 28 deletions

View File

@@ -0,0 +1,99 @@
# Task: Redesign Coding default page
## Identity
- Task ID: 20260906-coding-default-page-a7c42e
- Mode: Feature
- Branch: codex/20260906-coding-default-page-a7c42e-coding-default-page
- Worktree: /Users/inmanx/Documents/makelore-task-coding-default-page-a7c42e
- Base commit: f8eee430f4f4167dc2ecc682ece96c652cdde14b
- Owner: codex
- Status: Ready for Integration
## Scope
- Replace the no-project Code entry redirect with a dedicated conversation-first
landing state on `/chat`.
- Restyle both the no-project landing and the empty Conversation timeline around
the existing Makelore M brand mark, a large centered prompt, and the existing
bottom-composer hierarchy shown in the supplied Codex reference.
- Keep project creation reachable from the landing surface and update focused
Renderer/Electron coverage plus README current-state wording.
## Intent And Constraints
- Reuse `src/assets/logo.svg`; do not copy or approximate the Codex mark and do
not generate a new brand asset.
- Preserve the single Makelore light visual system, bundled typography, Chinese
UI, project-local `.makelore` authority, and all Main-owned runtime/API seams.
- The no-project call to action must open the existing Sidebar project-creation
flow rather than introducing a second creation implementation.
- Existing projects, Agent selection, Conversation creation, Composer behavior,
model/runtime controls, and accepted/uncertain mutation semantics remain
unchanged.
- Completed peer tasks for Plugin rehoming and removal of the project setup gate
overlap in Code-entry files but have no committed branch tips to consume. This
task therefore stays isolated on the recorded base and keeps its changes small
enough for later semantic integration.
## Outcome
- Code now resolves an empty local project list to `/chat` instead of redirecting
to Project Configuration.
- The no-project view uses the existing Makelore M vector asset, a large centered
guide sentence, and a low, wide project starter modeled on the supplied Codex
composition while retaining the Makelore sidebar and light visual system.
- Every project-starter action reuses the Sidebar's existing project-creation
dialog through a renderer-local event bridge; the secondary action opens the
existing project/settings route.
- Empty Conversations reuse the same branded hero above the real editable
Composer and automatically yield to the normal timeline after the first entry.
- README current-state wording, focused unit coverage, and the Code-entry Electron
navigation regression were updated. A side-by-side visual QA pass is recorded
in project-root `design-qa.md` with `final result: passed`.
## Verification
- `corepack pnpm install --frozen-lockfile` — passed with pinned pnpm `10.33.4`.
- `corepack pnpm run typecheck` — passed.
- `corepack pnpm exec vitest run tests/unit/coding-chat-panel.test.tsx tests/unit/coding-conversation-timeline.test.tsx tests/unit/module-navigation.test.tsx tests/unit/app-module-provider-gate.test.tsx --maxWorkers=4`
— 4 files, 58 tests passed.
- `corepack pnpm test` — 222 files passed; 1,861 tests passed and 3 skipped.
- `corepack pnpm run lint:check` — passed with 0 errors and the repository's 5
pre-existing warnings in `src/pages/Home/index.tsx` and
`src/pages/Makelore/index.tsx`.
- `corepack pnpm run build:vite` — Renderer, Electron Main, Preload, and utility
worker production builds passed; only existing Browserslist, mixed-import, and
chunk-size warnings were emitted.
- `corepack pnpm exec playwright test tests/e2e/main-navigation.spec.ts --grep
"returns to the module chooser"` — passed against the built Electron app,
including `/chat`, branded hero, starter visibility, and project-dialog launch.
- `git diff --check` — passed.
- Visual comparison:
`/Users/inmanx/.codex/visualizations/2026/09/06/01a0756a-b6f5-7892-a11c-1c1608ebe592/codex-reference-vs-makelore.png`
— no actionable P0/P1/P2 differences.
## Follow-ups
- During integration, semantically reconcile `App.tsx`, `Sidebar.tsx`, and the
Code-entry tests with the concurrently completed but uncommitted Plugin-rehoming
and project-gate-removal tasks; their branch tips contain no commits to merge or
cherry-pick from this feature worktree.
- Recheck the starter's `项目与插件设置` label after those peer changes establish
their final settings terminology.
## Promotion Candidates
- Target: `.project-docs/30-worklog/current-state.md` and
`.project-docs/40-domain/business-rules.md`.
Proposal: record that entering Code with no active local project remains on
`/chat`, presents the branded project starter, and routes all creation actions
through the single existing Sidebar flow; empty Conversations share the same
brand hero until their first entry.
Evidence: focused unit coverage, the passing Electron navigation regression,
production build, and the passed side-by-side visual QA.
Future impact: future routing or setup work must not restore the configuration
redirect or a second project-creation implementation.
Human confirmation: not required for intent because the user explicitly
requested this entry behavior; integration still must reconcile the overlapping
peer tasks semantically.