inboxer 0.4.2 → 0.4.4
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 +20 -5
- package/dist/ui/static/style.css +2 -1
- package/dist/ui/views.js +4 -4
- package/package.json +1 -1
- package/src/ui/static/style.css +2 -1
- package/src/ui/views.ts +5 -5
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
|
+

|
|
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
|
-
|
|
299
|
-
|
|
300
|
-
-
|
|
301
|
-
-
|
|
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
|
-
|
|
314
|
+
On a phone, navigation moves to a bottom tab bar and editors open as bottom sheets.
|
|
315
|
+
|
|
316
|
+

|
|
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
|
package/dist/ui/static/style.css
CHANGED
|
@@ -257,7 +257,7 @@ dialog.sheet form { position: relative; height: 100%; display: flex; flex-direct
|
|
|
257
257
|
.grabber { width: 40px; height: 5px; border-radius: 999px; background: var(--line); margin: 8px auto 9px; flex: none; }
|
|
258
258
|
.sheet-close { position: absolute; top: 8px; right: 8px; color: var(--muted); z-index: 1; }
|
|
259
259
|
dialog.sheet .field { padding: 0 16px; }
|
|
260
|
-
dialog.sheet .field.compact { padding-right: 60px; }
|
|
260
|
+
dialog.sheet .field.compact { padding-right: 60px; margin-top: 12px; }
|
|
261
261
|
dialog.sheet .field output { font-family: var(--mono); font-size: .8rem; padding: 10px 0; }
|
|
262
262
|
dialog.sheet textarea { flex: 1; min-height: 0; margin: 0; padding: 12px 16px; resize: none; }
|
|
263
263
|
.sheet-actions {
|
|
@@ -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/dist/ui/views.js
CHANGED
|
@@ -106,23 +106,23 @@ function composeDialog(senders) {
|
|
|
106
106
|
? h `<span class="select"><select id="compose-from" name="mailbox">${join(senders.map(m => h `<option value="${m.id}">${m.address}</option>`))}</select></span>`
|
|
107
107
|
: h `<input type="hidden" name="mailbox" value="${senders[0].id}"><output id="compose-from">${senders[0].address}</output>`;
|
|
108
108
|
return h `<dialog class="sheet" id="compose" aria-label="${S.newMail}">${mailForm("compose", "/compose", {
|
|
109
|
-
head: h `<div class="field compact"><label for="compose-from">${S.from}</label>${from}</div>`, to: "", cc: "", subject: "", text: "",
|
|
109
|
+
head: h `<div class="field compact"><label for="compose-from">${S.from}</label>${from}</div>`, headIsRow: true, to: "", cc: "", subject: "", text: "",
|
|
110
110
|
})}</dialog>`;
|
|
111
111
|
}
|
|
112
112
|
/** A reply opened from the reply box, shown in the edit sheet; nothing is saved until Save or Send. */
|
|
113
113
|
export function replyForm(threadId, query, replyToId, fields) {
|
|
114
114
|
return mailForm("reply", `/threads/${threadId}/reply/full?${query}`, {
|
|
115
115
|
...fields,
|
|
116
|
-
head: h `<input type="hidden" name="reply_to_id" value="${replyToId}"
|
|
116
|
+
head: h `<input type="hidden" name="reply_to_id" value="${replyToId}">`,
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
|
-
/** New mail and the full reply: recipients, subject, body and files, saved or sent in one post. */
|
|
119
|
+
/** New mail and the full reply: recipients, subject, body and files, saved or sent in one post. `head` is either a row or only hidden fields. */
|
|
120
120
|
function mailForm(id, action, f) {
|
|
121
121
|
return h `<form method="post" action="${action}" enctype="multipart/form-data" data-drop>
|
|
122
122
|
<div class="grabber" aria-hidden="true"></div>
|
|
123
123
|
<button type="button" class="icon-btn sheet-close" data-close aria-label="${S.close}">${icon("close")}</button>
|
|
124
124
|
${f.head}
|
|
125
|
-
<div class="field">
|
|
125
|
+
<div class="field ${f.headIsRow ? "" : "compact"}">
|
|
126
126
|
<label for="${id}-to">${S.to}</label>
|
|
127
127
|
<input id="${id}-to" name="to" value="${f.to}" autocomplete="off" required>
|
|
128
128
|
${when(!f.cc, () => h `<button type="button" class="link" onclick="this.remove();var r=document.getElementById('${id}-cc-row');r.hidden=false;r.querySelector('input').focus()">${S.cc}</button>`)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "inboxer",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
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/static/style.css
CHANGED
|
@@ -257,7 +257,7 @@ dialog.sheet form { position: relative; height: 100%; display: flex; flex-direct
|
|
|
257
257
|
.grabber { width: 40px; height: 5px; border-radius: 999px; background: var(--line); margin: 8px auto 9px; flex: none; }
|
|
258
258
|
.sheet-close { position: absolute; top: 8px; right: 8px; color: var(--muted); z-index: 1; }
|
|
259
259
|
dialog.sheet .field { padding: 0 16px; }
|
|
260
|
-
dialog.sheet .field.compact { padding-right: 60px; }
|
|
260
|
+
dialog.sheet .field.compact { padding-right: 60px; margin-top: 12px; }
|
|
261
261
|
dialog.sheet .field output { font-family: var(--mono); font-size: .8rem; padding: 10px 0; }
|
|
262
262
|
dialog.sheet textarea { flex: 1; min-height: 0; margin: 0; padding: 12px 16px; resize: none; }
|
|
263
263
|
.sheet-actions {
|
|
@@ -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/src/ui/views.ts
CHANGED
|
@@ -142,7 +142,7 @@ function composeDialog(senders: Mailbox[]): View {
|
|
|
142
142
|
? h`<span class="select"><select id="compose-from" name="mailbox">${join(senders.map(m => h`<option value="${m.id}">${m.address}</option>`))}</select></span>`
|
|
143
143
|
: h`<input type="hidden" name="mailbox" value="${senders[0]!.id}"><output id="compose-from">${senders[0]!.address}</output>`;
|
|
144
144
|
return h`<dialog class="sheet" id="compose" aria-label="${S.newMail}">${mailForm("compose", "/compose", {
|
|
145
|
-
head: h`<div class="field compact"><label for="compose-from">${S.from}</label>${from}</div>`, to: "", cc: "", subject: "", text: "",
|
|
145
|
+
head: h`<div class="field compact"><label for="compose-from">${S.from}</label>${from}</div>`, headIsRow: true, to: "", cc: "", subject: "", text: "",
|
|
146
146
|
})}</dialog>`;
|
|
147
147
|
}
|
|
148
148
|
|
|
@@ -150,17 +150,17 @@ function composeDialog(senders: Mailbox[]): View {
|
|
|
150
150
|
export function replyForm(threadId: string, query: string, replyToId: string, fields: { to: string; cc: string; subject: string; text: string }): View {
|
|
151
151
|
return mailForm("reply", `/threads/${threadId}/reply/full?${query}`, {
|
|
152
152
|
...fields,
|
|
153
|
-
head: h`<input type="hidden" name="reply_to_id" value="${replyToId}"
|
|
153
|
+
head: h`<input type="hidden" name="reply_to_id" value="${replyToId}">`,
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
/** New mail and the full reply: recipients, subject, body and files, saved or sent in one post. */
|
|
158
|
-
function mailForm(id: string, action: string, f: { head: View; to: string; cc: string; subject: string; text: string }): View {
|
|
157
|
+
/** New mail and the full reply: recipients, subject, body and files, saved or sent in one post. `head` is either a row or only hidden fields. */
|
|
158
|
+
function mailForm(id: string, action: string, f: { head: View; headIsRow?: boolean; to: string; cc: string; subject: string; text: string }): View {
|
|
159
159
|
return h`<form method="post" action="${action}" enctype="multipart/form-data" data-drop>
|
|
160
160
|
<div class="grabber" aria-hidden="true"></div>
|
|
161
161
|
<button type="button" class="icon-btn sheet-close" data-close aria-label="${S.close}">${icon("close")}</button>
|
|
162
162
|
${f.head}
|
|
163
|
-
<div class="field">
|
|
163
|
+
<div class="field ${f.headIsRow ? "" : "compact"}">
|
|
164
164
|
<label for="${id}-to">${S.to}</label>
|
|
165
165
|
<input id="${id}-to" name="to" value="${f.to}" autocomplete="off" required>
|
|
166
166
|
${when(!f.cc, () => h`<button type="button" class="link" onclick="this.remove();var r=document.getElementById('${id}-cc-row');r.hidden=false;r.querySelector('input').focus()">${S.cc}</button>`)}
|