Add MVP AI session dashboard with shared session registry#356
Conversation
Agent-Logs-Url: https://github.com/tninja/ai-code-interface.el/sessions/cc89fddd-a1d6-47bd-9862-95a4aa0ca75f Co-authored-by: tninja <714625+tninja@users.noreply.github.com>
Agent-Logs-Url: https://github.com/tninja/ai-code-interface.el/sessions/cc89fddd-a1d6-47bd-9862-95a4aa0ca75f Co-authored-by: tninja <714625+tninja@users.noreply.github.com>
Agent-Logs-Url: https://github.com/tninja/ai-code-interface.el/sessions/cc89fddd-a1d6-47bd-9862-95a4aa0ca75f Co-authored-by: tninja <714625+tninja@users.noreply.github.com>
|
@copilot no need for dedicate ai-code-session-dashboard.el. content should be merged to ai-code-session.el |
Agent-Logs-Url: https://github.com/tninja/ai-code-interface.el/sessions/b779b762-86e3-4b01-a210-778c5171230d Co-authored-by: tninja <714625+tninja@users.noreply.github.com>
Agent-Logs-Url: https://github.com/tninja/ai-code-interface.el/sessions/b779b762-86e3-4b01-a210-778c5171230d Co-authored-by: tninja <714625+tninja@users.noreply.github.com>
Merged the dashboard implementation into Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot can we show the shortcut keys in the bottom of the dashboard, so user can easily learn how to use? |
Agent-Logs-Url: https://github.com/tninja/ai-code-interface.el/sessions/7c058b64-8fc6-4ad2-bbdb-a9babc44b4ef Co-authored-by: tninja <714625+tninja@users.noreply.github.com>
Agent-Logs-Url: https://github.com/tninja/ai-code-interface.el/sessions/7c058b64-8fc6-4ad2-bbdb-a9babc44b4ef Co-authored-by: tninja <714625+tninja@users.noreply.github.com>
Added the shortcut hint at the bottom of the dashboard via the dashboard mode line in Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
…tninja/ai-code-interface.el into copilot/add-ai-coding-session-dashboard
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 59ce42f01f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| (delete-process process)) | ||
| (when (buffer-live-p buffer) | ||
| (kill-buffer buffer)) | ||
| (ai-code-session-unregister session) |
There was a problem hiding this comment.
Unregister killed dashboard sessions by ID or buffer
ai-code-session-dashboard-kill-session calls ai-code-session-unregister with the full ai-code-session struct, but ai-code-session-get (used by unregister) only accepts a session ID string or a buffer. That makes this unregister step a no-op, so if kill-buffer is declined or blocked (for example by kill-buffer-query-functions), the session remains registered even though the process was deleted, leaving stale entries in the dashboard.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
This PR adds an MVP AI session dashboard backed by a shared session registry, so users can see and return to active AI CLI sessions across repositories and backends.
Changes:
- Adds
ai-code-session.elwith session registration, metadata refresh, dashboard rendering, and dashboard actions. - Integrates backend session lifecycle code with the shared registry.
- Adds a transient menu entry and focused ERT tests for the new dashboard/session APIs.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
ai-code-session.el |
Adds the session model, registry API, metadata refresh, and tabulated dashboard UI. |
ai-code-backends-infra.el |
Registers, refreshes, and unregisters terminal-backed AI sessions during lifecycle events. |
ai-code.el |
Adds the dashboard entry to the AI CLI session transient menu and moves the prompt-on-file entry. |
test/test_ai-code-session.el |
Adds tests for registry behavior, dashboard rendering, and dashboard actions. |
test/test_ai-code.el |
Adds a menu test for the new dashboard entry. |
| (goto-char (point-max)) | ||
| (unless (bolp) | ||
| (insert "\n")) | ||
| (insert (propertize ai-code-session-dashboard-shortcuts-hint | ||
| 'face 'mode-line-inactive)) | ||
| (insert "\n"))) |
| (delete-process process)) | ||
| (when (buffer-live-p buffer) | ||
| (kill-buffer buffer)) | ||
| (ai-code-session-unregister session) |
| (interactive) | ||
| (if-let* ((session (ai-code-session-dashboard--session-at-point)) | ||
| (repo-root (ai-code-session-repo-root session))) | ||
| (magit-status-setup-buffer repo-root) |
| (ai-code-session-register | ||
| :buffer buffer | ||
| :backend prefix | ||
| :repo-root working-dir | ||
| :task-file resolved-task-file)))) |
This adds an MVP dashboard for active AI coding sessions across repos/backends, centered on quick recall and fast return to in-flight work. The implementation keeps session tracking out of the UI by introducing a small shared session registry that backend infra updates as terminal sessions start, refresh, and exit.
Session model, registry, and dashboard
ai-code-session.elwith a lightweightcl-defstruct, small query/update API, and the dashboard UI:ai-code-session-registerai-code-session-unregisterai-code-session-listai-code-session-getai-code-session-update-metadataai-code-session-refreshai-code-session-dashboard:branch,:status,:dirty-count).Dashboard UI
ai-code-session.elusingtabulated-list-mode.RETswitch to session bufferr/grefreshkkill session/bufferDopen Magit status for the session repoBackend infra integration
ai-code-backends-infra.elinto the session registry so terminal-backed sessions are registered on create/reuse and unregistered on cleanup/buffer kill.User entry point
ai-code.el:j→ai-code-session-dashboardCoverage
Example session API shape:
> [!WARNING]
>
>