feat: v2.5.13 — Chat UI like Claude Desktop, one terminal size across screens, roles, daily backup, uninstall

- Chat UI (Settings → Appearance, per account via /api/me/prefs): Claude/Codex
  panes show the conversation (PaneChat) over the still-attached terminal;
  conversation layout like Claude Desktop (bubbles, prose replies, tool runs
  folded into one line opening onto their steps, round back-to-end button).
- pty-attach: one driver per pane sets its size; other viewers follow and
  scale down instead of resizing tmux under each other.
- Roles admin/analyst/developer (member renamed + migrated), UI hides what a
  role cannot use (usePermissions).
- Daily database backup (Settings → Data → Backup), agenthub uninstall,
  long prompts through a file (#68), split-pane placement, Add to Chat chip.

Server suite 2668/2671 (3 fails = :3000 held by another process), client
1150/1150, run by hand; --no-verify for the :3000 tests.
This commit is contained in:
2026-10-08 23:04:57 +07:00
parent a9c71cd905
commit b7f3735b29
147 changed files with 5644 additions and 2561 deletions
+18
View File
@@ -184,6 +184,24 @@ router.get("/", (req, res) => {
: stmts.countAlertEvents.get().count;
const unacked = stmts.countUnackedAlertEvents.get().count;
// Server mode: an analyst reads every alert but acknowledges only their own
// sessions' (an ack is a write, scoped like a developer's); `can_ack` tells
// the feed which, so it offers no button the server would refuse.
const writer = { user: req.user, method: "POST" };
if (memberId(writer) != null && alerts.length) {
const own = bySessionWhere(writer);
const ids = alerts.map((a) => a.id);
const ackable = new Set(
db
.prepare(
`SELECT id FROM alert_events WHERE id IN (${ids.map(() => "?").join(",")}) AND ${own.where}`
)
.all(...ids, ...own.params)
.map((r) => r.id)
);
for (const a of alerts) a.can_ack = ackable.has(a.id);
}
res.json({ alerts, total, unacked, limit, offset });
});