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:
+7
-6
@@ -169,8 +169,9 @@ function initPtyWebSocket(server) {
|
||||
socket.destroy();
|
||||
return;
|
||||
}
|
||||
// Server mode: a member attaches only to a pane of their own workspace.
|
||||
if (isServerMode() && !canSeeRun({ user: userFromRequest(req) }, match[1])) {
|
||||
// Server mode: a terminal is a write, so a developer or an analyst
|
||||
// attaches only to a pane of their own workspace.
|
||||
if (isServerMode() && !canSeeRun({ user: userFromRequest(req), method: "POST" }, match[1])) {
|
||||
socket.destroy();
|
||||
return;
|
||||
}
|
||||
@@ -192,7 +193,7 @@ function initPtyWebSocket(server) {
|
||||
});
|
||||
|
||||
// Server mode: a terminal stays open only while its user may still use it —
|
||||
// logged in, not disabled, not an analyst, still owning the pane's workspace.
|
||||
// logged in, not disabled, still owning the pane's workspace.
|
||||
const recheck = setInterval(() => {
|
||||
if (!ptyWss) {
|
||||
clearInterval(recheck);
|
||||
@@ -201,7 +202,7 @@ function initPtyWebSocket(server) {
|
||||
ptyWss.clients.forEach((ws) => {
|
||||
if (ws.cookie === undefined) return;
|
||||
const user = userFromRequest({ headers: { cookie: ws.cookie } });
|
||||
if (!user || user.role === "analyst" || !canSeeRun({ user }, ws.runId)) {
|
||||
if (!user || !canSeeRun({ user, method: "POST" }, ws.runId)) {
|
||||
try {
|
||||
ws.close(1008, "log in again");
|
||||
} catch {
|
||||
@@ -222,7 +223,7 @@ function broadcast(type, data) {
|
||||
// Server mode: worked out once, and only when a member is connected.
|
||||
let audience;
|
||||
const reaches = (client) => {
|
||||
if (!client.user || client.user.role !== "member")
|
||||
if (!client.user || client.user.role !== "developer")
|
||||
return !isServerMode() || Boolean(client.user);
|
||||
if (audience === undefined) {
|
||||
try {
|
||||
@@ -237,7 +238,7 @@ function broadcast(type, data) {
|
||||
wss.clients.forEach((client) => {
|
||||
if (client.readyState === 1 && reaches(client)) {
|
||||
try {
|
||||
const member = client.user && client.user.role === "member";
|
||||
const member = client.user && client.user.role === "developer";
|
||||
if (member && audience && audience.strip) {
|
||||
stripped ??= JSON.stringify({ type, data: {}, timestamp: new Date().toISOString() });
|
||||
client.send(stripped);
|
||||
|
||||
Reference in New Issue
Block a user