inboxer 0.4.3 → 0.4.5

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/README.md CHANGED
@@ -11,6 +11,8 @@ Inboxer has no business rules. It does not decide what to answer or when. Each c
11
11
  - **No passwords.** The UI uses one-time login links that an agent requests through MCP. Every link signs in one browser.
12
12
  - **Runs on Node.js and Bun.** It works standalone or as a [roster-server](https://github.com/clasen/RosterServer) site.
13
13
 
14
+ ![A thread in the review UI on desktop](docs/screenshots/desktop-thread-dark.png)
15
+
14
16
  ## Use cases
15
17
 
16
18
  Inboxer handles storage, threading and delivery. The decisions belong to whoever calls the tools, so the same instance can serve very different workflows.
@@ -295,13 +297,25 @@ Every thread, message and draft in a result carries a `url` that opens it in the
295
297
 
296
298
  The UI is server-rendered with Hono and htmx, without a front-end build, and works on a phone.
297
299
 
298
- - **Drafts:** mailbox, recipient, the agent's note and the thread underneath, newest first, with Edit, Send and Discard. Send and Discard happen after `ui.undoSec` seconds, with an Undo button meanwhile; the wait runs on the server, so closing the tab does not cancel it and a restart resumes it. Agents cannot change a draft during that window.
299
- - **Editing:** To, Cc, Subject and a plain-text body, with Save and Save & Send. Attach files with the Attach button or by dropping them on the editor; they go out with the message. HTML is generated from the text at send time, with the mailbox signature. If the agent changed the draft while you were editing, saving shows both versions instead of overwriting. Your edits mark the draft `edited_by_human`, so agents leave it alone.
300
- - **Inbox:** threads per mailbox, filtered by mailbox and by unanswered, all or archived.
301
- - **Thread:** messages newest first, as plain text, with the context agents stored for the thread and its participants. Incoming HTML is never rendered. Images, embedded ones included, show as thumbnails under the message and other attachments as file links. Only common image types and PDFs open in the browser, sandboxed; everything else downloads.
300
+ <p>
301
+ <img src="docs/screenshots/mobile-inbox-dark.png" width="24%" alt="Inbox on a phone">
302
+ <img src="docs/screenshots/mobile-thread-dark.png" width="24%" alt="A thread with a pending draft">
303
+ <img src="docs/screenshots/mobile-context-dark.png" width="24%" alt="The context sheet">
304
+ <img src="docs/screenshots/mobile-compose-dark.png" width="24%" alt="New mail">
305
+ </p>
306
+
307
+ - **Drafts:** pending drafts newest first, with mailbox, recipient and who wrote them. Opening one shows it at the end of its thread with the agent's note, Edit, Send and Discard. Send and Discard happen after `ui.undoSec` seconds, with an Undo button meanwhile; the wait runs on the server, so closing the tab does not cancel it and a restart resumes it. Agents cannot change a draft during that window.
308
+ - **Editing:** Edit opens the draft in a sheet with To, Cc, Subject and a plain-text body, and Save or Save & Send. Attach files with the paperclip or by dropping them on the sheet; they go out with the message. HTML is generated from the text at send time, with the mailbox signature. If the agent changed the draft while you were editing, saving shows both versions instead of overwriting. Your edits mark the draft `edited_by_human`, so agents leave it alone.
309
+ - **Inbox:** threads per mailbox, filtered by mailbox and by pending (unanswered), all or archived.
310
+ - **Thread:** messages oldest to newest as chat bubbles, yours on one side and theirs on the other, as plain text. Incoming HTML is never rendered. Images, embedded ones included, show as thumbnails under the message and other attachments as file links. Only common image types and PDFs open in the browser, sandboxed; everything else downloads. **Context** shows what agents stored for the thread and its participants.
311
+ - **Replying:** the box under the thread sends a quick reply, to the sender or to everyone. The **+** button opens the full reply, with Cc, Subject and attachments. **New mail** starts a conversation from any mailbox you can send from.
302
312
  - **Devices:** the browsers signed in, each with a Revoke button.
303
313
 
304
- The theme follows the system setting, with a System / Light / Dark switch stored in a cookie. Every UI string lives in `src/ui/strings.ts`.
314
+ On a phone, navigation moves to a bottom tab bar and editors open as bottom sheets.
315
+
316
+ ![The context panel in the light theme](docs/screenshots/desktop-context-light.png)
317
+
318
+ The theme follows the system setting; **Settings** has a System / Light / Dark switch stored in a cookie, and Log out. Every UI string lives in `src/ui/strings.ts`.
305
319
 
306
320
  ### Signing in
307
321
 
@@ -362,6 +376,7 @@ npx skills add https://github.com/clasen/Inboxer --skill inboxer
362
376
  npm test # Node.js test runner
363
377
  npm run test:bun # the same suite under Bun
364
378
  npm run build # compiles to dist/
379
+ npm run preview # the review UI on dummy data, nothing is sent
365
380
  ```
366
381
 
367
382
  ## License
@@ -381,6 +381,7 @@ select:hover, select:focus { border-color: var(--focus); outline: none; }
381
381
  font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
382
382
  }
383
383
  .field input { flex: 1; min-width: 0; border: none; background: none; padding: 11px 0; font: inherit; color: var(--fg); outline: none; }
384
+ .field select { height: auto; padding: 11px 30px 11px 0; border: none; border-radius: 0; font-size: inherit; }
384
385
  .field:focus-within { border-bottom-color: var(--focus); }
385
386
  .field .link { font-family: var(--mono); font-size: .72rem; }
386
387
  textarea {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inboxer",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "A self-hosted mail layer for agents: persists every inbound and outbound email, exposes an MCP server, and ships a minimal UI to review drafts.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/ui/routes.ts CHANGED
@@ -108,8 +108,9 @@ export function registerUi(app: Hono<UiEnv>, mail: Mail, access: Access, cfg: In
108
108
  };
109
109
 
110
110
  app.get("/", async c => {
111
- const drafts = await mail.listDrafts(undefined, c.get("session").scope);
112
- return page(c, S.navDrafts, V.inboxPage(V.draftList(drafts, null), null), "drafts");
111
+ const session = c.get("session");
112
+ const drafts = await mail.listDrafts(undefined, session.scope);
113
+ return page(c, S.navDrafts, V.inboxPage(V.draftList(drafts, domainsOf(session), null), null), "drafts");
113
114
  });
114
115
 
115
116
  app.get("/drafts/:id", async c => {
@@ -118,7 +119,7 @@ export function registerUi(app: Hono<UiEnv>, mail: Mail, access: Access, cfg: In
118
119
  if (draft.status !== "draft") return c.redirect(`/threads/${draft.thread_id}?status=all`, 303);
119
120
  const { thread, view } = await threadPane(c, draft.thread_id, "/");
120
121
  const drafts = await mail.listDrafts(undefined, session.scope);
121
- return page(c, thread.subject || S.navDrafts, V.inboxPage(V.draftList(drafts, draft.id), view), "drafts", 200, true);
122
+ return page(c, thread.subject || S.navDrafts, V.inboxPage(V.draftList(drafts, domainsOf(session), draft.id), view), "drafts", 200, true);
122
123
  });
123
124
 
124
125
  app.get("/drafts/:id/card", async c => c.html(await draftView(c, c.req.param("id"))));
@@ -75,7 +75,7 @@ body.full .tabbar { display: none; }
75
75
  display: flex; flex-direction: column; gap: 4px;
76
76
  padding: 20px 14px; border-right: 1px solid var(--line);
77
77
  }
78
- .brand { font-size: 20px; font-weight: 700; letter-spacing: -0.03em; padding: 0 12px; }
78
+ .brand { font-size: 21px; line-height: 1.2; font-weight: 700; letter-spacing: -0.03em; text-transform: lowercase; padding: 0 12px; }
79
79
  .brand span { color: var(--accent); }
80
80
  .new-mail { display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 12px; margin: 16px 0 14px; }
81
81
  .side-nav { display: flex; flex-direction: column; gap: 2px; }
@@ -103,8 +103,9 @@ body.full .tabbar { display: none; }
103
103
  body.context-open .split .list { display: none; }
104
104
  }
105
105
 
106
- .list-head { padding: 18px 16px 12px; }
106
+ .list-head { padding: 20px 16px 12px; }
107
107
  .list-head h1 { font-size: 21px; line-height: 1.2; letter-spacing: -0.02em; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
108
+ .list-head small { font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-left: 4px; }
108
109
  .filters { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
109
110
  .chips { display: flex; flex: none; gap: 8px; }
110
111
  .filters .select { min-width: 0; }
@@ -381,6 +382,7 @@ select:hover, select:focus { border-color: var(--focus); outline: none; }
381
382
  font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
382
383
  }
383
384
  .field input { flex: 1; min-width: 0; border: none; background: none; padding: 11px 0; font: inherit; color: var(--fg); outline: none; }
385
+ .field select { height: auto; padding: 11px 30px 11px 0; border: none; border-radius: 0; font-size: inherit; }
384
386
  .field:focus-within { border-bottom-color: var(--focus); }
385
387
  .field .link { font-family: var(--mono); font-size: .72rem; }
386
388
  textarea {
package/src/ui/views.ts CHANGED
@@ -369,10 +369,17 @@ export function draftDone(id: string, text: string): View {
369
369
  return h`<article class="card notice" id="draft-${id}">${text}</article>`;
370
370
  }
371
371
 
372
+ /** A list's title: the session's sending domains, with the list's name beside them. */
373
+ function listTitle(domains: string[], label: string): View {
374
+ return domains.length
375
+ ? h`<h1>${domains.join(" · ")} <small>${label}</small></h1>`
376
+ : h`<h1>${label}</h1>`;
377
+ }
378
+
372
379
  /** Drafts waiting for review, listed like the inbox; each opens its thread. */
373
- export function draftList(drafts: Message[], current: string | null): View {
380
+ export function draftList(drafts: Message[], domains: string[], current: string | null): View {
374
381
  return h`<section class="list">
375
- <header class="list-head"><h1>${S.navDrafts}</h1></header>
382
+ <header class="list-head">${listTitle(domains, S.navDrafts)}</header>
376
383
  ${drafts.length ? join(drafts.map(d => h`<a class="row" href="/drafts/${d.id}" ${raw(d.id === current ? 'aria-current="page"' : "")}>
377
384
  <span class="avatar" aria-hidden="true">${initials(d.to[0] ?? d.mailbox)}</span>
378
385
  <span class="row-main">
@@ -404,7 +411,7 @@ export function threadList(threads: Thread[], opts: { mailboxes: string[]; domai
404
411
  h`<a class="chip" href="/inbox?${inboxQuery({ ...filter, status })}" ${raw(filter.status === status ? 'aria-current="page"' : "")}>${label}</a>`;
405
412
  return h`<section class="list">
406
413
  <header class="list-head">
407
- <h1>${opts.domains.length ? opts.domains.join(" · ") : S.navInbox}</h1>
414
+ ${listTitle(opts.domains, S.navInbox)}
408
415
  <form class="filters" method="get" action="/inbox">
409
416
  <input type="hidden" name="status" value="${filter.status}">
410
417
  <nav class="chips" aria-label="${S.filter}">${tab("unanswered", S.filterPending)}${tab("all", S.filterAll)}${tab("archived", S.filterArchived)}</nav>