feat: simplify mobile new chat and project selection - #491
Conversation
Model: gpt-5.4 Amp-Thread-ID: https://ampcode.com/threads/T-01a05fa8-bf70-7328-be77-9fcbf097f344 Co-authored-by: Amp <amp@ampcode.com>
Model: gpt-5.4 Amp-Thread-ID: https://ampcode.com/threads/T-01a05fc2-f7bd-727a-b790-2bc84e2d239f Co-authored-by: Amp <amp@ampcode.com>
Model: gpt-5.4 Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-01a05fe5-c1cd-7323-a0cc-afdb1c9c6c89
Model: gpt-5.4 Amp-Thread-ID: https://ampcode.com/threads/T-01a06020-210b-770f-946e-2a7409a07824 Co-authored-by: Amp <amp@ampcode.com>
Model: gpt-5.6-luna
Model: gpt-5.4 Amp-Thread-ID: https://ampcode.com/threads/T-01a06044-fcc0-7786-b98d-363c93e39518 Co-authored-by: Amp <amp@ampcode.com>
Model: gpt-5.4 Amp-Thread-ID: https://ampcode.com/threads/T-01a06057-7a98-716f-9605-d7060690b5ca Co-authored-by: Amp <amp@ampcode.com>
Model: gpt-5.4 Amp-Thread-ID: https://ampcode.com/threads/T-01a06072-141b-7394-b1fd-5381178ca7db Co-authored-by: Amp <amp@ampcode.com>
Model: gpt-5.6-luna
Model: gpt-5.6 Amp-Thread-ID: https://ampcode.com/threads/T-01a065c7-5b86-7365-8e55-8ff02d310f4a Co-authored-by: Amp <amp@ampcode.com>
Model: gpt-6
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@natsustan, this pull request needs updates before review. It is marked If the PR remains invalid for 7 days, it will be closed and marked Policy findings |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e3c0585b9a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const entry = visibleLocalProjectMap.get(project.projectKey); | ||
| if (!entry) return; | ||
| handleSelectedLocalProjectChange({ | ||
| machineId: entry.machineId, | ||
| localProjectId: entry.project.id, |
There was a problem hiding this comment.
Keep project shortcuts on the active Role's machine
When a retained draft has an active Role bound to machine A, closing the sheet and tapping the new-chat action for a local project on machine B reaches this handler without the guard used by the header and machine selectors. handleSelectedLocalProjectChange switches machines, and the agent-sync effect then replaces the Role-bound agent, silently dropping the selected Role and its run configuration. Reject or disable this shortcut while its project is on another machine.
AGENTS.md reference: packages/components/src/components/chat/AGENTS.md:L31-L35
Useful? React with 👍 / 👎.
| trailing={ | ||
| selectedTab === 'chat' && chatFilterPills && chatFilterPills.length > 0 ? ( | ||
| <ChatListFilterToggle | ||
| open={chatFiltersOpen} | ||
| hasActiveFilters={hasActiveChatFilters} | ||
| ariaLabel={labels.filterBarToggleLabel ?? '过滤器'} | ||
| onToggle={() => setChatFiltersOpen((open) => !open)} | ||
| /> |
There was a problem hiding this comment.
Keep the filter toggle outside the fading search slot
On the inspected mobile home screen, this toggle now inherits the search slot's pointer-events-none and aria-hidden state whenever pull-to-refresh or ambient offline/reconnect/refresh status hides search. Existing filters continue affecting the conversation list, but users cannot reopen the filter controls until the status clears; retain the toggle on the first group heading as specified.
AGENTS.md reference: packages/components/src/components/mobile/AGENTS.md:L91-L94
Useful? React with 👍 / 👎.
Resolve the composer focus conflict and retain upstream documentation structure with the new mobile composition invariants. Model: gpt-6
Related issue
Closes #490
Problem / pressure
On narrow screens, New Chat spreads project targeting and execution settings across multiple rows, leaving less room for writing. A separate Work/Chat switch adds a redundant step when the intended context is already a project or no project.
Summary
Before / after
Test plan
Passed with Node 22.23.1 and the pinned pnpm:
mise exec node@22.23.1 -- corepack pnpm check(typecheck, lint, CI tests, i18n and boundary checks).mise exec node@22.23.1 -- corepack pnpm format; conflict-resolution files were formatted after merging main.mise exec node@22.23.1 -- corepack pnpm start:localbuilt and launched the local desktop app; the merged branch also passedpnpm --dir apps/electron build:app.Try it locally
@Leeeon233 — please try the narrow-screen flow using the steps below. This stays a draft for evaluation. The current contribution policy requires maintainer assignment for external changes over 1,000 lines; please assign #490 to natsustan if you would like this branch to proceed through review.
gh pr checkout 491 --repo LodyAI/Lody), initialize the public submodules, and install dependencies with the pinned pnpm.mise exec node@22.23.1 -- corepack pnpm start:local.mise exec node@22.23.1 -- corepack pnpm storybookand openMobile/MobileNewChatSheet.Context handoff
Instructions for reviewing agents
Authoring context