Conversation
This reverts commit 663fda2.
|
Code review finding: Blocker: the new temporary-session replacement flow only recognizes Please make the temporary-session helpers and replacement paths treat |
|
Another review finding: High risk: That is a real multi-user permission regression: projects can silently become visible only to user 1, or appear under the wrong owner after a filesystem refresh. I think the fallback here needs to stay |
|
One more review finding: Medium/high risk: the new provider-scoped session identity work is not carried through to the local message-cache lookup, so sessions with the same The issue is that this PR already codifies that the same |
| try { | ||
| return await buildPromise; | ||
| } finally { | ||
| if (codexSessionsIndexPromise === buildPromise) { |
| try { | ||
| return await buildPromise; | ||
| } finally { | ||
| if (codexSessionsIndexPromise === buildPromise) { |
Review — conditional LGTM (depends on follow-up commits)Read through the diff end-to-end with a focus on the three areas that caused #167 to be reverted (per this PR's discussion thread):
All three are fixed in this branch by
Residual risks worth another pair of eyes
Test coverageStrong on unit level — all three regression scenarios have targeted tests. The new Weak on integration level — no test for simultaneous cross-provider requests on the same session, no test for message cache migration under real cache hits, and no regression test pinned to the original #167 bug. RecommendationApprove if and only if
Since this is a reapply of previously-reverted code, I'd err toward extra caution and ask whoever merges to watch error telemetry for ~24h post-merge. |
- Extract lifecycle helpers (inferProviderFromMessageType, resolveProjectName, enrichSessionEventPayload, buildLifecycleMessageFromPayload) into server/utils/sessionLifecycle.js for testability; server/index.js delegates to the extracted module with real DB/fs deps via a shared singleton. - Add 33 unit tests for the extracted lifecycle functions covering provider inference, project name resolution, payload enrichment, and lifecycle message construction (risk 2). - Add 2 codexQueue tests for order preservation under concurrent temp→settled promotions and promotion-then-reconciliation interleave (risk 3). - Document localStorage message cache key migration in CHANGELOG (risk 5). - Risk 4 (provider array consolidation) deferred — too invasive for this PR. All 149 tests pass. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…fixes test: address PR170 review residual risks (2, 3, 5)
…res) Merge upstream/main into topic/upstream/pr170-review-fixes to unblock the PR merge. Conflicts arose from two upstream PRs landing on main after our branch diverged: - #171 feat/btw-gemini-codex: added /btw side-question support for Gemini and Codex; resolved by keeping btw handler block from main before our existing builtin command handler in useChatComposerState.ts, and adding the btw/CODEX_MODELS imports alongside our buildCodexSessionCreatedEvent import in openai-codex.js. - #173 feat/file-preview-reader-modes: auto-merged cleanly. All 149 tests pass. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…fixes Topic/upstream/pr170 review fixes
|
Henry提出的问题已经都修复了,把main最新的几个commit也涵盖了进来。ops 4.6又review了一遍,又根据那个改了一下。现在应该可以了。 |
- Remove unused inferProviderFromMessageType wrapper from server/index.js; no call sites exist after the sessionLifecycle.js extraction. - Remove always-false (isLoading && isCurrentViewSession) sub-condition from isCodexSessionBusy; isLoading is always false at that point. No behavior change. All 149 tests pass. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…fixes fix: remove dead code flagged by Copilot static analysis
|
copilot 最后提到的两个小点都优化了 |
…tion or class' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Manual Testing Findings (2026-04-15)1. Gemini session shows no output and displays incorrect name
2. Codex queue system not activated — send button disabled during session processing
3. Processing/resuming state lost after page refresh (e.g. Codex)
|
- Extend temporary session rebind logic to cover Gemini (previously Codex-only), fixing the race where gemini-response messages arrive before React updates activeViewSessionId from the new-session-* placeholder. - Add WebSocketWriter.replaceSocket() hot-swap method and store writer references in all provider session maps (Claude SDK, Codex, Gemini, OpenRouter, Local GPU, Nano). On check-session-status, if the session is still running, rebind the writer to the reconnected WebSocket so messages reach the new client. - Increase STATUS_VALIDATION_TIMEOUT_MS from 5s to 10s and guard the timeout effect with a !ws check so it only starts counting after the WebSocket connects. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…fixes fix: Gemini session output rendering, session resume after page refresh
|
Latest version merged, e975aa7. All issues fixed as Dingjie mentioned. Except the second one: queue and steer are in a separate branch and I will submit another pr once done. |
…tion or class' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
…ycle) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…fixes Topic/upstream/pr170 review fixes
…tion or class' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
PR Split NoticeThis PR has been split into 6 smaller, independently reviewable PRs to reduce review complexity (55 files, +7800/-1967 → 6 focused PRs). Split PRs
Merge orderOnce all 6 split PRs are merged, this PR can be closed. |
Summary
Context
#167 was merged by mistake and then reverted in #169. This PR reintroduces that work on a fresh branch so collaborators can continue fixing and refining it safely.
Testing