Skip to content

emrg: fix open-session returning to session view + add GitHub issue path to promotion feedback - #932

Merged
argszero merged 1 commit into
masterfrom
feature/gui-open-session-view
Aug 22, 2026
Merged

emrg: fix open-session returning to session view + add GitHub issue path to promotion feedback#932
argszero merged 1 commit into
masterfrom
feature/gui-open-session-view

Conversation

@argszero

Copy link
Copy Markdown
Owner

Two fixes serving two host rants (2026-08-22T08:07:47 + 08:14:31).

Fix 1 — GUI task panel "Open session" button no-op (emrg/gui/renderer/js/app.js)

Problem: clicking a task row's "open session" button changed nothing visibly. Root cause: App.switchSession only switched state.sessionId and activated the session view, but never called switchView — so state.activeView stayed "tasks" and the UI remained on the task panel (silent no-op). The open-session dialog worked because it's invoked from the sessions view.

Fix: after a successful non-silent switchSession, if state.activeView !== "sessions", call switchView("sessions") — done inside switchSession so all entry points (task/rant/project panels) behave consistently. Recursive/init paths use silent:true and won't trigger a repeated switch.

Fix 2 — promotion feedback should file a public GitHub issue (emrg/server/promote_prompt.md)

Problem: Step 4 "Collect feedback" only wrote valuable community feedback to ~/.emrg/rants.jsonl (an internal queue — no issue number, not community-visible, community can't participate).

Fix: added a GitHub-issue path to Step 4 — for valuable feedback (feature request / bug / negative experience / new problem / inspiration), file a public issue on the promoted repo (gh issue create -R <owner>/<repo> --title <English> --body "<summary> (source: <channel> <link>)"), record the issue number in the state file, and optionally reference it in the rant to avoid duplicate handling. Degrades to rants.jsonl if issues are disabled; the promotion task still only collects + hands off (does not implement). Per host clarification: only nudge the community to file it themselves if (a) the discussion already explicitly mentioned the project and (b) they're likely willing — otherwise file it yourself.

Verification

  • uv run pytest tests/: 1002 passed, 1 skipped
  • python -c "from emrg.client.app import run_client": OK
  • python -m emrg --help: OK
  • GUI renderer smoke suite +1 test (129→130, total 259) — Agent.md counts synced; CI (test-windows) covers the JS suite (no local node on this host).

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

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

✅ LGTM — cycle 1249. Fresh diff review vs master 4f3dda5: (1) switchSession now returns to the sessions view after a successful non-silent switch, fixing the panel-view no-op (silent recursive/init paths correctly skip it); (2) promote_prompt.md Step 4 gains the public GitHub-issue path with the host-tightened condition and the degrade-to-rants.jsonl fallback. Renderer smoke test covers the view-switch; Agent.md counts synced (129→130). CI test+test-windows green (run 32542312431).

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

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

✅ LGTM — cycle 1250. Re-verified: head 8474354 unchanged, mergeable, CI test+test-windows green (run 32542312431). Both changes sound — switchSession returns to the session view on non-silent success, and promote_prompt.md Step 4 files a public issue for valuable feedback with the host-tightened condition. No issues.

@pm25coder

Copy link
Copy Markdown
Collaborator

I tested this PR and found no issues — independent test report:

Scope: 4 files, +27/-2 (Agent.md GUI count 258→259, app.js switchSession view-switch, +1 renderer smoke test, promote_prompt.md GitHub-issue filing section).

Checks performed (PR head applied via patch on master 4f3dda5):

  1. GUI test suite: npm test259 tests, 250 pass, 0 fail, 8 skipped — matches the Agent.md doc update (renderer smoke 129→130).
  2. Backend suite: uv run pytest tests/ -q938 passed, 65 skipped — doc-count guard green (Python count untouched at 1003).
  3. Jinja2 render check on the new promote_prompt.md section (the gh issue create -R {{ owner }}/{{ repo }} line): verified with the same render context as scheduler.py _build_evolution_prompt() (jinja2.Undefined) — {{ owner }}/{{ repo }} resolves to argszero/emrg (context includes owner/repo since emrg: open-source prompt PR submission rules — default branch base + act on feedback (rant 2026-08-20T21:53:36) #902), not the empty-render landmine from the emrg: open-source prompt PR submission rules — default branch base + act on feedback (rant 2026-08-20T21:53:36) #902 incident. One note: the placeholder resolves to the evolution repo, so if a future promote task targets a different project (custom tasks.yml), issues would still be filed on argszero/emrg — fine for the current EMRG self-promotion semantics, just worth keeping in mind.
  4. Code review (app.js): switchSession success → switchView("sessions") gated on !opts.silent && state.activeView !== "sessions" — no recursion risk (silent boot/init paths skip), and all entry points (task/rant/project panels) now behave consistently.

No blocking findings.

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

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

✅ LGTM — cycle 1251. Fresh diff review vs master 4f3dda5: head 8474354 unchanged, mergeable/CLEAN, CI test+test-windows both green (run 32542312431). (1) switchSession now calls switchView("sessions") on non-silent successful switch when activeView !== "sessions", fixing the panel-view no-op — recursive/init silent paths correctly skip it. (2) promote_prompt.md Step 4 adds the public GitHub-issue path with the host-tightened condition (only nudge if the discussion already referenced the project AND the user seems willing; otherwise file it yourself) plus the rants.jsonl degrade fallback. Renderer smoke test covers the view-switch; Agent.md counts synced (258→259, 129→130). No issues.

@argszero
argszero merged commit c40cce6 into masterAug 22, 2026
2 checks passed
argszero added a commit that referenced this pull request Aug 22, 2026
Co-authored-by: EMRG Evolution <emrg@argszero.dev>
@argszero
argszero deleted the feature/gui-open-session-view branch August 23, 2026 02:26
argszero added a commit that referenced this pull request Aug 28, 2026
… regression) (#1059)
Rant 2026-08-28T11:16:47: the React GUI (v0.2.85) task-management rows
only show Trigger/Edit/Delete; the vanilla (v0.2.65, #924) rows had a
fourth "Open Session" button that jumped straight into the task's
session. The daemon still returns project/project_path/session_id from
TaskHandler.status() — only the React port dropped them.
- workspaceView.ts TaskRec: add project/project_path/session_id fields
(daemon status() payload, lost in the Batch 5 migration).
- WorkspaceView.tsx TaskList: insert "Open Session" button after
Trigger (vanilla order 触发/打开会话/编辑/删除), disabled when the
task has no session_id, click bubbles onOpenSession(task); add
onOpenSessionTask prop + pass-through.
- Shell.tsx: openTaskSession handler calls the existing emrg:switchSession
bridge with { sessionId: task.session_id, projectPath: task.project_path }
(projectPath optional in the WorkspaceBridge type), then setActiveSid +
switch back to the sessions view (vanilla #932 lesson — from the task
panel the view must return to the chat or the user thinks nothing
happened). Errors surface via openSession.loadFailed system message.
- Tests: WorkspaceView task-list test asserts 4-button order, disabled
state without session_id, and the open-session click callback; Shell
wiring test clicks Open session → switchSession called with
sessionId+projectPath → panel returns to sessions view.
- Agent.md renderer count 448 -> 449 (Shell 25 -> 26).
Verified: renderer vitest 449/449 + tsc clean + vite build OK; GUI node
tests 87 pass/8 skip; pytest 1147 passed + 1 skipped (1148 == Agent.md).
Co-authored-by: EMRG Evolution <emrg@argszero.dev>
Sign up for freeto 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

@argszero@pm25coder