You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "hbw00111 (via GitHub)" <gi...@apache.org> on 2026/09/22 05:52:05 UTC
[PR] fix(desktop): preserve thinking choice when adding a project [maka]
hbw00111 opened a new pull request, #5581:
URL: https://github.com/apache/maka/pull/5581
## Summary
Fixes #5576.
Selecting `high` for a new task and adding a project now preserves that thinking choice when the added project becomes the current target on the same Host/profile. Previously, changing the project draft key discarded the explicit choice.
Task Entry publishes a scoped, one-use handoff only after the refreshed catalog contains the available project. The thinking consumer copies an explicit choice only for the same effective model and a supported thinking level; existing target choices win and the source choice stays intact. Ordinary navigation, failed refreshes, executor targets, and existing sessions (including an ID whose summary has not loaded yet) do not inherit the choice.
## Verification
- Full build and all workspace typechecks passed.
- Desktop tests: **2783/2783 passed**. Focused Task Entry controller/provider tests: **21/21 passed**.
- The real `TaskEntryRoot` + `useShellChatModel` regression selects `high`, adds project B, waits for a deferred catalog refresh, and verifies B retains `high`. Disabling the handoff makes this regression fail (`undefined` instead of `high`); restoring it passes.
- Regression coverage also verifies failed refreshes publish no handoff and an active session ID with no loaded summary cannot inherit thinking.
- Lint, format, ASF headers, Desktop/UI Knip and renderer architecture check against `upstream/main` passed. The architecture ledger tightens existing debt counts; no limits were increased.
- No new visual UI is introduced. Live Electron interaction and packaged-platform testing were not run for this change; behavior evidence is the integration test above.
## AI use
- [x] Generative tooling made a substantive contribution
OpenAI Codex implemented the fix and regression tests and ran the checks above on behalf of @hbw00111. Native Codex agents assisted with implementation, testing and independent review. AI-authored commits carry a `Generated-by` trailer.
## Checklist
- [x] Tests cover the change and fail without it
- [x] Lint, format, typecheck and the affected suites pass locally
Does this PR entail a change in behavior?
- [x] Yes — described under Summary above
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] fix(desktop): preserve model and thinking when adding a project [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han commented on code in PR #5581:
URL: https://github.com/apache/maka/pull/5581#discussion_r4118299188
##########
apps/desktop/src/renderer/app-shell.tsx:
##########
@@ -763,13 +763,12 @@ function AppShellContent({
activationCandidate: modelSettingsOwnsComposerHost
? onboardingActivationCandidate
: undefined,
+ activeId,
activeSession: activeSessionForModelControls,
sessionHealthSession: activeSession,
persistedComposerDefaults,
usePersistedComposerDefaults: modelSettingsOwnsComposerHost,
- connectionSnapshotReady: activeId
- ? sessionHostConnections.projection.status === 'ready'
- : true,
+ connectionSnapshotReady: sessionHostConnections.projection.status === 'ready',
Review Comment:
P1: without an active session, `sessionHostConnections` resolves to `NO_HOST_KEY`, which is never requested or seeded, so this stays false for a new-task draft. `use-shell-chat-model.ts:147` then records no hand-off identity, and the model (and with it thinking) is never inherited. The previous `: true` fallback, or better the new-task connection readiness, seems needed here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] fix(desktop): preserve model and thinking when adding a project [maka]
Posted by "github-actions[bot] (via GitHub) via commits" <co...@maka.apache.org>.
github-actions[bot] commented on PR #5581:
URL: https://github.com/apache/maka/pull/5581#issuecomment-6568509684
<!-- maka-lifecycle:stale-warning -->
This pull request has had no new commits for 30 days and has been marked stale. It will be closed in 7 days unless a new commit is pushed.
Comments do not reset this timer: only a new commit does. If the pull request is intentionally long-lived, a maintainer can apply the `pinned` label.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] fix(desktop): preserve thinking choice when adding a project [maka]
Posted by "hqhq1025 (via GitHub)" <gi...@apache.org>.
hqhq1025 commented on code in PR #5581:
URL: https://github.com/apache/maka/pull/5581#discussion_r4106022638
##########
apps/desktop/src/renderer/use-shell-chat-model.ts:
##########
@@ -211,6 +204,21 @@ export function useShellChatModel(options: {
choice.connectionSlug === newChatModel?.llmConnectionSlug &&
choice.model === newChatModel?.model,
);
+ const newChatThinkingLevels = newChatModelChoice?.thinkingLevels ?? [];
+ const canHandoffNewTaskThinking = !options.activeId && !activeSession && !pendingExecutorTarget;
+ const [pendingNewChatThinkingLevel, setPendingNewChatThinkingLevel, clearPendingNewChatThinkingLevel] =
+ useNewTaskChoice<ThinkingLevel | null>(options.newTaskKey, {
Review Comment:
[P2] Hand off the explicit model choice together with thinking for non-default models. `pendingExecutionChoice` is still keyed to the old draft key, while only the thinking choice opts into this project handoff. If a user selects a non-catalog-default model on a non-default Host, sets `high`, then adds a project, the destination loses the model pick and falls back to the catalog default. The identity check then consumes the handoff without copying `high`, so the reset reported in #5576 remains reachable. Please cover this with a two-model, non-default-Host provider regression; if a changed model intentionally cannot inherit the level, surface that reset rather than silently dropping the user's choice.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org