Skip to content

emrg: GUI multi-session acceptance completion — project activity ordering + model_set idempotency test - #644

Merged
argszero merged 1 commit into
masterfrom
feature/gui-multisession-acceptance-completion
Aug 10, 2026
Merged

emrg: GUI multi-session acceptance completion — project activity ordering + model_set idempotency test#644
argszero merged 1 commit into
masterfrom
feature/gui-multisession-acceptance-completion

Conversation

@argszero

Copy link
Copy Markdown
Owner

Completes two remaining acceptance items of the GUI multi-session rant (2026-08-10T15:07:19).

1. Project list now ordered by latest session activity (acceptance: "选项目按该项目最新会话活跃倒序")

  • daemon _handle_list_projects now parallel-scans each project's <path>/.emrg/sessions/*/meta.json for the max created_at (asyncio.gather) and returns projects sorted desc, with a new latest_session_at field.
  • Root cause: projects.yml is written sorted by path, and list_projects returned file order — the open/new-session dialogs were NOT actually showing most-recently-active projects first.
  • Architecture note: the GUI cannot issue concurrent list_sessions on one connection (DaemonClient _pending is keyed by respType, so parallel calls overwrite each other) — aggregation belongs daemon-side.
  • The TUI /rant project picker benefits too (most recent first).

2. model_set multi-connection idempotency test (acceptance: "model_set 多连接重复收无副作用")

  • renderer.smoke test: two/three connections broadcasting the same model_set → state.model stable, no extra system messages, switcher label consistent.

+2 tests (pytest 680→681, renderer.smoke 55→56). GUI 173/173, 681 pytest green, doc counts synced.

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle 20260810-185020. Daemon-side project activity ordering (correct architecture: GUI single-conn can't parallel list_sessions) + model_set multi-conn idempotency test. GUI 173/173, pytest 681, doc guard green.

@pm25coder

Copy link
Copy Markdown
Contributor

Tested the branch code end-to-end and diagnosed the conflict.

@argszero
argszero force-pushed the feature/gui-multisession-acceptance-completion branch from 516912d to 0d46827 Compare August 10, 2026 10:59

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle 20260810-185649. Verified locally on head 516912d: pytest 681/681, GUI npm test 173/173, doc counts synced (43+17+22+56+15+7+3+3+3=173). Architecture correct: daemon-side aggregation (GUI single-conn pending map keys by respType → concurrent list_sessions would overwrite). Session.list_sessions sorts created_at desc (sessions[0]=newest) verified; no-session projects sort last with empty latest_session_at (stable reverse sort). Note: the PR's push event was dropped (no checks on branch) — re-triggered CI via workflow_dispatch (run 31381490576) → SUCCESS. model_set multi-conn idempotency regression test is sound (same value → no state change, no duplicate system messages).

@pm25coder

Copy link
Copy Markdown
Contributor

Confirmed the rebased branch (head 0d46827 on top of c17f524) — my exact resolution was applied:

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle 20260810-190101. Re-verified on head 0d46827: GUI 176/176, pytest 681, CI green (31381515196). Daemon-side project activity ordering (parallel scan, latest_session_at) + model_set multi-connection idempotency test — both acceptance items verified. Merge.

@argszero
argszero merged commit e9bd40e into master Aug 10, 2026
1 check passed
@argszero
argszero deleted the feature/gui-multisession-acceptance-completion branch August 10, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants