Avatar photo uploads and a global handbrake for the agent engine
Two operator asks, one review gate: Avatar portraits (migration 052): the avatar editor gains "Upload photo" - the renderer downscales the chosen picture to a ~96px cover crop and stores it as a small data URL (PNG keeps transparency, the rest compresses to JPEG), so the snapshot stays light and the CSP needs nothing new. The portrait wins over emoji and initials everywhere the shared Avatar renders (chat, org chart, office card, sidebar), and "Remove photo" falls back cleanly. The main process validates scheme and size (base64 image data URL, <=300k chars) so a rogue caller cannot re-bloat the snapshot. e2e uploads a real PNG through the profile dialog and sees the portrait land in the sidebar. Global pause (migration 053): when agents start talking in circles, one topbar toggle - visible on every page - pulls the handbrake. app_state.autorun_paused survives restarts; the queue worker checks it each tick and neither enqueues nor claims while set (the run already in flight finishes). Queued work simply waits and the paused state renders as an amber "resume" pill. A unit test drives the real worker: paused leaves a queued run untouched through many ticks, resuming claims it within moments; e2e flips the toggle in the live shell.
This commit is contained in:
1 parent
78e88807da
commit
cb71afa6b7
25 files changed
+373
-23
No files matched your search
@@ -0,0 +1,7 @@
|
||||
export const avatarImagesSchema = `
|
||||
alter table agents add column avatar_image text;
|
||||
alter table employees add column avatar_image text;
|
||||
|
||||
insert into schema_migrations(version, name, applied_at)
|
||||
values (52, 'avatar_images', datetime('now'));
|
||||
`;
|
||||
@@ -0,0 +1,6 @@
|
||||
export const autonomousPauseSchema = `
|
||||
alter table app_state add column autorun_paused integer not null default 0;
|
||||
|
||||
insert into schema_migrations(version, name, applied_at)
|
||||
values (53, 'autonomous_pause', datetime('now'));
|
||||
`;
|
||||
@@ -50,6 +50,8 @@ import { uiPreferencesSchema } from "./migrations/048-ui-preferences";
|
||||
import { avatarsSchema } from "./migrations/049-avatars";
|
||||
import { financeSalesDepartmentsSchema } from "./migrations/050-finance-sales-departments";
|
||||
import { purgeRuntimeSnapshotBloatSchema } from "./migrations/051-purge-runtime-snapshot-bloat";
|
||||
import { avatarImagesSchema } from "./migrations/052-avatar-images";
|
||||
import { autonomousPauseSchema } from "./migrations/053-autonomous-pause";
|
||||
|
||||
interface Migration {
|
||||
version: number;
|
||||
@@ -109,6 +111,8 @@ const MIGRATIONS: Migration[] = [
|
||||
{ version: 49, name: "avatars", sql: avatarsSchema },
|
||||
{ version: 50, name: "finance_sales_departments", sql: financeSalesDepartmentsSchema },
|
||||
{ version: 51, name: "purge_runtime_snapshot_bloat", sql: purgeRuntimeSnapshotBloatSchema },
|
||||
{ version: 52, name: "avatar_images", sql: avatarImagesSchema },
|
||||
{ version: 53, name: "autonomous_pause", sql: autonomousPauseSchema },
|
||||
];
|
||||
|
||||
const SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1].version;
|
||||
|
||||
Reference in new issue
Block a user