@koinzhang/paseo-plugin-inbox 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,35 @@ All notable changes to `@koinzhang/paseo-plugin-inbox` are documented in this fi
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.3.0] - 2026-11-26
9
+
10
+ Requires Paseo **>= 0.17.4**.
11
+
12
+ ### Added
13
+
14
+ - Add note-row Pin / Copy / Send / Delete and agent-row Open / Pin / Remove actions, revealed on hover on web / desktop and fixed on mobile. Copy uses the host clipboard; Send inserts the current editor body into the focused agent's composer without replacing the existing prompt or starting a turn.
15
+ - Replace archived agent rows' Open action with the detail page's Unarchive flow, sharing restore status, success feedback, and state refresh.
16
+ - Add an Agents / Notes multi-select filter, defaulting to both; detail actions share the list's borderless icon-and-divider treatment.
17
+ - Show full edit times for workspace notes and host update times for workspace agents, with a starred-time fallback; detail headings truncate to one line and agent replies use the SDK Markdown renderer.
18
+
19
+ ### Changed
20
+
21
+ - Remove scratch as a separate type: `/inbox <text>` saves a note directly, the Scratch filter and Convert action are gone, and stored scratch entries migrate to notes without losing their content or tags.
22
+ - Remove detail action borders and agent message boxes; note details keep a borderless editor.
23
+ - Advance note update time only for actual title or body edits, not pin, tag, or identical-content saves; remove the New note button's green primary styling.
24
+ - Keep desktop row action disabled states independent of hover so moving onto the icons does not recreate their pointer targets.
25
+ - Move global Project / Workspace scope chips into the search-bar Filter menu alongside Agents / Notes. All scopes support multi-selection; Project / Workspace filters start unselected, only apply when selected, and leave untagged items visible. Counts, archived labels, and persistence remain.
26
+ - Open the first item when entering the global Inbox without a selection. Desktop row actions reserve title width only while visible; restore horizontal list / detail resizing and use the Explorer surface background for workspace panels.
27
+ - Use single-document FileText icons for notes and FilePlus2 for note creation instead of notebook-style icons.
28
+ - Use a PanelsTopLeft icon for Workspace tags instead of the Git branch symbol; Project keeps its Folder icon.
29
+ - Remove the full-width divider between the search toolbar and the note / agent list; keep the inset separators between items.
30
+ - Collapse the list search behind its toolbar icon: click Search to expand and focus it, and close it with X to clear the query. Global and workspace lists share the same toolbar.
31
+ - Edit note titles directly in the detail header; the separate title field and its divider above the body are gone, and agent detail headings stay read-only.
32
+ - Align the compact detail back arrow, tags, and editor, and keep the detail title on the navigation row.
33
+ - Pin the plugin SDK, daemon client, and protocol development dependency to 0.17.4; workspace recovery now uses that client's terminal-response waiting behavior.
34
+ - Refresh connected clients after Inbox writes through the SDK's subscription API. Events contain only an invalidation signal; clients re-read current data after subscribing or reconnecting. Slow clients coalesce notifications without blocking writes, and cleanup releases subscriptions and retries.
35
+ - Remove the deprecated workspace panel context registration and use host-scoped workspace references for cached panel lookup. Keep archived/missing handling, project keys, saved tabs, and the SQLite table unchanged.
36
+
8
37
  ## [0.2.0] - 2026-11-05
9
38
 
10
39
  Requires Paseo **>= 0.15.0**.
@@ -32,6 +61,7 @@ Requires Paseo **>= 0.9.0**.
32
61
  - Empty notes are never kept: a new note is saved only once it has a title or text, and a note left empty is removed.
33
62
  - Items grouped by project: git remote URL, falling back to the repository root path.
34
63
 
35
- [Unreleased]: https://github.com/koinzhang/paseo-plugins/compare/inbox-v0.2.0...HEAD
64
+ [Unreleased]: https://github.com/koinzhang/paseo-plugins/compare/inbox-v0.3.0...HEAD
65
+ [0.3.0]: https://github.com/koinzhang/paseo-plugins/releases/tag/inbox-v0.3.0
36
66
  [0.2.0]: https://github.com/koinzhang/paseo-plugins/releases/tag/inbox-v0.2.0
37
67
  [0.1.0]: https://github.com/koinzhang/paseo-plugins/releases/tag/inbox-v0.1.0
package/README.md CHANGED
@@ -1,19 +1,32 @@
1
1
  # Inbox
2
2
 
3
- A personal inbox for Paseo: star agents, keep notes per project, and capture scratch text without leaving the composer.
3
+ A personal inbox for Paseo: star agents and keep notes per project without leaving the composer.
4
4
 
5
- - **Starred agents**: ⌘K → *Add agent to Inbox*. A starred agent stays in the Inbox after it is archived; *Unarchive* restores it, restoring its archived workspace first when needed. Its detail shows the latest user prompt and the latest agent reply.
5
+ - **Starred agents**: ⌘K → *Add agent to Inbox*. A starred agent stays in the Inbox after it is archived; *Unarchive* restores it, restoring its archived workspace first when needed. Its detail shows the latest user prompt as text and the latest agent reply through Paseo's Markdown renderer.
6
6
  - **Notes**: ⌘K → *New Inbox note*, or *+ Note* in the Inbox. Autosaved plain text / Markdown.
7
- - **Scratch**: type `/inbox <text>` in an agent composer. It is tagged with the current project. Nothing is sent to the agent. Convert scratch to a note later.
7
+ - **Copy or reuse a note**: every note row has Copy and Send icons. Copy puts its exact body on the clipboard. Send inserts the body into the focused agent's composer, preserving the existing prompt, then focuses that input; it does not send a turn. The Send button is unavailable when no agent is focused.
8
+ - **Capture a note**: type `/inbox <text>` in an agent composer. It is saved directly as a note tagged with the current project. Nothing is sent to the agent.
8
9
  - **Star from the composer**: type `/inbox` with no text to add the current agent to the Inbox.
9
- - **Tags**: every item can carry a project tag and a workspace tag. On a note or scratch, tap the tags in its detail to change them. A workspace must belong to the tagged project: while a workspace is set, other projects are unavailable, and picking a workspace alone sets its project. A starred agent is tagged with its own workspace and project.
10
- - **Workspace Inbox**: the *Inbox* panel in the right-hand Explorer shows items tagged with that workspace, plus items tagged only with its project. It is a filtered view of the one Inbox, so everything in it is also on the Inbox page. A note added in the panel is tagged with that workspace. An Inbox icon in the workspace header opens it, and hides while the panel is open. The note and add-agent buttons sit to the right of search. Workspace and project chips on the Inbox page appear only on the *Agents* tab; tap one to narrow the agents, tap again to clear. The choice is kept when you leave Agents and applied again when you come back.
10
+ - **Tags**: every item can carry a project tag and a workspace tag. On a note, tap the tags in its detail to change them. A workspace must belong to the tagged project: while a workspace is set, other projects are unavailable, and picking a workspace alone sets its project. A starred agent is tagged with its own workspace and project.
11
+ - **Workspace Inbox**: the *Inbox* panel in the right-hand Explorer shows items tagged with that workspace, plus items tagged only with its project. It is a filtered view of the one Inbox, so everything in it is also on the Inbox page. A note added in the panel is tagged with that workspace. An Inbox icon in the workspace header opens it, and hides while the panel is open. Its transparent surface follows the Explorer background; workspace notes show edit times and agents show their provider and latest activity time.
12
+ - **Filters**: the global Filter menu beside search contains independently multi-selectable Agents / Notes, Projects, and Workspaces. Project and Workspace filters start unselected and only narrow the list when selected; items without the corresponding tag remain visible regardless of that filter. The first item opens automatically on an empty global selection.
11
13
  - **Archived projects and workspaces**: their items stay in the Inbox; their tags and chips are struck through, and the strike goes away when they are restored.
12
14
  - **Sorting**: the button next to *+ Note* on the Inbox page cycles through updated time (default), starred time, created time, and name. Drag the divider to resize the list. Pinned items stay on top.
13
15
  - **Projects**: items are grouped by the git remote URL (`origin`, else the first remote), falling back to the repository root, then the directory. Worktrees of one repository share a project.
14
16
  - **Hosts**: data lives on each daemon in `~/.paseo/plugin-data/inbox/inbox.db`. With several hosts connected, the Inbox host picker switches between them.
15
-
16
- Requires Paseo >= 0.15.0 and a daemon Node runtime with `node:sqlite`.
17
+ - **Live refresh**: writes on one client invalidate the Inbox queries on other connected clients of the same host. Only an invalidation signal is sent, never note contents; each client reads the SQLite-backed RPCs again. A new or reconnected subscription refreshes from current data rather than replaying missed events. An open note updates from remote text only when it has no unsaved local edits; this is not collaborative editing or conflict resolution. Agent status still refreshes every 10 seconds.
18
+ - **Row actions**: notes have Pin / Copy / Send / Delete; agents have Open / Pin / Remove from Inbox. Archived agents replace Open with the same Unarchive action as their detail page, including workspace recovery and pending state. Open is disabled for missing agents, and removing a starred agent does not archive or delete it. All row actions appear on hover on web / desktop and stay visible on mobile.
19
+ - **Workspace subtitles**: in the workspace panel, notes show their full edit time and date without repeating project tags. Agents show their actual provider (for example, codex or claude) and the host's latest update time and date; if it is unavailable, the subtitle explicitly shows the starred time instead.
20
+ - **Note update time**: only an actual title or body change advances a note's edit time. Pinning, unpinning, changing tags, and saving identical content leave it unchanged. Notes use the single-document FileText icon; New note uses FilePlus2 and the same bordered icon style as Star and Sort.
21
+ - **Copy and composer insertion**: detail pages place Copy / Send between Pin and Delete, using the current editor body even before autosave. Send inserts into the focused agent's composer without replacing its existing draft or submitting a prompt.
22
+ - **Quiet details**: all note and agent actions use the list's borderless icons with separators between every adjacent action, including Delete. Note titles are edited directly in the detail heading, with no separate title field above the body. Agent detail headings remain read-only and truncate on one line.
23
+ - **Scope icons**: Project uses Folder and Workspace uses PanelsTopLeft, avoiding the misleading Git branch symbol.
24
+ - **List spacing**: the search toolbar flows directly into the list without a full-width divider; inset separators between items remain.
25
+ - **List toolbar**: lightweight, borderless icons keep search, filters, and actions compact. Click Search to expand and focus the input; close it with X to clear the query. Both global and workspace lists use the same interaction.
26
+ - **Detail metadata**: Project and Workspace chips share one row with the actions; chips shrink and truncate rather than wrap, while the actions stay aligned to the right.
27
+ - **List layout**: desktop actions do not consume title width until hover; the measured action width then truncates the title without overlap. The list / detail divider supports horizontal resizing.
28
+
29
+ Requires Paseo >= 0.17.4 and a daemon Node runtime with `node:sqlite`. The plugin SDK, daemon client, and protocol development dependency are pinned to 0.17.4.
17
30
 
18
31
  ## Install
19
32
 
@@ -0,0 +1,69 @@
1
+ import type { PluginSubscriptionHandle } from "@getpaseo/plugin/client";
2
+
3
+ type Subscribe = (onEvent: () => void, onClosed: (error?: Error) => void) => PluginSubscriptionHandle;
4
+
5
+ export function watchInboxChanges(
6
+ subscribe: Subscribe,
7
+ refresh: () => void,
8
+ retryMs = 10_000,
9
+ report: (error: unknown) => void = (error) => console.error("[inbox] change subscription failed", error),
10
+ ): () => void {
11
+ let disposed = false;
12
+ let current: PluginSubscriptionHandle | null = null;
13
+
14
+ const connect = () => {
15
+ if (disposed || current) return;
16
+ refresh();
17
+ let handle: PluginSubscriptionHandle | undefined;
18
+ let closed = false;
19
+ const onClosed = (error?: Error) => {
20
+ if (closed) return;
21
+ closed = true;
22
+ if (disposed || (current && current !== handle)) return;
23
+ current = null;
24
+ if (error) report(error);
25
+ refresh();
26
+ };
27
+ try {
28
+ handle = subscribe(
29
+ () => {
30
+ if (!disposed && !closed && (!current || current === handle)) refresh();
31
+ },
32
+ onClosed,
33
+ );
34
+ if (disposed || closed) {
35
+ handle();
36
+ return;
37
+ }
38
+ current = handle;
39
+ const owned = handle;
40
+ void owned.ready.then(
41
+ () => {
42
+ if (!disposed && current === owned) refresh();
43
+ },
44
+ (error: unknown) => {
45
+ if (disposed || current !== owned) return;
46
+ closed = true;
47
+ current = null;
48
+ owned();
49
+ report(error);
50
+ refresh();
51
+ },
52
+ );
53
+ } catch (error) {
54
+ closed = true;
55
+ report(error);
56
+ refresh();
57
+ }
58
+ };
59
+
60
+ const timer = setInterval(connect, retryMs);
61
+ connect();
62
+ return () => {
63
+ disposed = true;
64
+ clearInterval(timer);
65
+ const handle = current;
66
+ current = null;
67
+ handle?.();
68
+ };
69
+ }
@@ -0,0 +1,13 @@
1
+ export function shouldSelectFirstItem({
2
+ globalSurface,
3
+ selection,
4
+ firstItemId,
5
+ isPlaceholderData,
6
+ }: {
7
+ globalSurface: boolean;
8
+ selection: { id: string | null } | null;
9
+ firstItemId: string | undefined;
10
+ isPlaceholderData: boolean;
11
+ }): boolean {
12
+ return globalSurface && selection === null && !isPlaceholderData && firstItemId !== undefined;
13
+ }