Skip to content

emrg: GUI projects panel (rant 2026-08-13T14:10:14 P5) - #747

Merged
argszero merged 1 commit into
masterfrom
feature/gui-projects-panel
Aug 13, 2026
Merged

emrg: GUI projects panel (rant 2026-08-13T14:10:14 P5)#747
argszero merged 1 commit into
masterfrom
feature/gui-projects-panel

Conversation

@argszero

Copy link
Copy Markdown
Owner

GUI redesign (host rant 2026-08-13T14:10:14) — P5 projects panel.

The sidebar 项目 (projects) nav entry now opens a functional projects panel (previously a placeholder). Reuses the existing daemon IPC surface from the multi-session work (listProjects / listProjectSessions / registerProject / removeProject) — zero daemon changes.

Features

  • List: project name + path + relative last-active time (relTime), plus an ⚡ auto-evolve badge for projects that have a task in tasks.yml targeting them (from listTasks).
  • View sessions: per-project session drill-down inside the panel (listProjectSessions, created_at desc); clicking a session switches to it with the project's cwd (multi-session resume semantics); ← back button returns to the list.
  • Add: 「+ 添加项目」→ directory picker → registerProject (implicit daemon registration); success toast + panel refresh.
  • Delete: per-row delete with the existing protected-project guard (emrg / emrg-task read-only) + confirm dialog + removeProject (disk data kept); panel refreshes after removal. confirmDeleteProject gained an optional onDone callback so both the open-session dialog and the panel can refresh their own list.
  • openProjectsPanel() lazy-loads the list on nav open (same pattern as P3 tasks panel); i18n zh/en keys added.

Tests

  • +1 smoke test: list rendering (2 rows, auto-evolve badge positive/negative), view-sessions drill-down + back, delete flow (confirm → removeProject called with correct name); GUI 234→235 (renderer smoke 112→113).
  • 777 pytest + 235 GUI + import + CLI + doc-count guard all green locally; CI pending.

@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 (1/3)

Reviewed the full diff for P5 (projects panel) of the GUI redesign (rant 14:10:14):

  • Projects nav now opens a functional panel reusing existing daemon IPC (listProjects/listProjectSessions/registerProject/removeProject) — zero daemon changes, correct reuse of the multi-session surface.
  • List renders name/path/relTime last-active + ⚡ auto-evolve badge derived from tasks.yml (task config.project match) — truthful signal, cheap one extra IPC via Promise.all.
  • View-sessions drill-down + ← back, session click switches with project cwd (resume semantics); add-project via picker→registerProject; delete reuses protected-project guard + confirm, with the confirmDeleteProject onDone refactor keeping both dialog and panel refresh paths correct.
  • openProjectsPanel() lazy-loads on nav open, matching the P3 tasks-panel pattern; i18n zh/en keys added; explicit list.innerHTML='' clear guards the test-sandbox innerHTML fidelity gap.
  • New smoke test covers list + badge pos/neg + drill-down/back + delete flow; GUI 234→235. Verified locally: 777 pytest + 235 GUI + import + CLI + doc-count guard green; CI test + test-windows PASS (31678798539), mergeStateStatus CLEAN.

@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 (1/3)

Reviewed full diff for P5 (GUI projects panel, rant 14:10:14, 213+/6-):

  • openProjectsPanel follows the established openTasksPanel pattern (switchPanel + load, error → Chat.addSystemMessage); nav click handler extended for projects.
  • renderProjectList: listProjects + listTasks (auto_evolve badge from tasks whose config.project matches), path + relTime hints, per-row 查看会话/删除 actions; protected-project guard (emrg/emrg-task) + confirm dialog preserved; confirmDeleteProject extended with optional onDone callback (backward-compatible default → showOpenSessionDialog).
  • showProjectSessionsInPanel: back button + listProjectSessions + switchSession with projectPath (cwd follows project — verified switchSession forwards opts.projectPath to IPC).
  • Dependencies verified: relTime defined in utils.js:81 (window export); IPC listProjects/listProjectSessions/registerProject present in preload.js; removeProject wired in confirmDeleteProject.
  • i18n: 14 zh/en keys, consistent naming; index.html panel placeholder filled with hint + add button.
  • Tests: new P5 smoke test covers positive (emrg badge from evolution task) AND negative (docs no badge) states, sessions view, back, delete-refresh; ELEMENT_IDS updated. npm test 235/235 pass locally; Agent.md counts synced; doc-count guard green; CI test + test-windows SUCCESS (31678798539); mergeStateStatus CLEAN.

@pm25coder

Copy link
Copy Markdown
Contributor

I tested this PR end-to-end and it's clean. GUI projects panel (rant 14:10:14 P5):

@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 (3/3)

Third independent-cycle approval. Head unchanged since 2/3; CI test + test-windows PASS (31678798539), mergeStateStatus CLEAN. P5 projects panel — list + auto-evolve badge + relTime, view-sessions drill-down, add/delete with protected guard, zero daemon changes, GUI 234→235. Reached 3 consecutive ✅ — merging.

@argszero
argszero merged commit f5eeadd into master Aug 13, 2026
2 checks passed
pm25coder pushed a commit to pm25coder/emrg that referenced this pull request Aug 13, 2026
argszero pushed a commit that referenced this pull request Aug 13, 2026
…749)

* emrg: evolution_prompt quick-ref — add #747 GUI projects panel entry

* emrg: fix #747 quick-ref entry — projects.* keys + +1 renderer.smoke per maintainer review

---------

Co-authored-by: EMRG Evolution <emrg@argszero.dev>
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