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
@@ -40,6 +40,12 @@ export interface UpdateAgentInput {
|
||||
avatarEmoji?: string;
|
||||
/** Background color for the avatar tile; empty string clears it. */
|
||||
avatarColor?: string;
|
||||
/** data:image/... portrait (already downscaled); empty string clears it. */
|
||||
avatarImage?: string;
|
||||
}
|
||||
|
||||
export interface SetAutonomousPausedInput {
|
||||
paused: boolean;
|
||||
}
|
||||
|
||||
export interface UpdateEmployeeProfileInput {
|
||||
@@ -48,6 +54,7 @@ export interface UpdateEmployeeProfileInput {
|
||||
displayName: string;
|
||||
avatarEmoji?: string;
|
||||
avatarColor?: string;
|
||||
avatarImage?: string;
|
||||
}
|
||||
|
||||
export interface CreateAgentInput {
|
||||
|
||||
@@ -6,6 +6,7 @@ import type {
|
||||
BootstrapOnboardingSummary,
|
||||
CancelProviderResponseInput,
|
||||
CreateAgentInput,
|
||||
SetAutonomousPausedInput,
|
||||
UpdateAgentInput,
|
||||
UpdateEmployeeProfileInput,
|
||||
CreateApprovalInput,
|
||||
@@ -109,6 +110,7 @@ export interface DesktopApi {
|
||||
createAgent(input: CreateAgentInput): Promise<DesktopResult<AppSnapshot>>;
|
||||
updateAgent(input: UpdateAgentInput): Promise<DesktopResult<AppSnapshot>>;
|
||||
updateEmployeeProfile(input: UpdateEmployeeProfileInput): Promise<DesktopResult<AppSnapshot>>;
|
||||
setAutonomousPaused(input: SetAutonomousPausedInput): Promise<DesktopResult<AppSnapshot>>;
|
||||
createTask(input: CreateTaskInput): Promise<DesktopResult<AppSnapshot>>;
|
||||
updateTask(input: UpdateTaskInput): Promise<DesktopResult<AppSnapshot>>;
|
||||
deleteTask(input: DeleteTaskInput): Promise<DesktopResult<AppSnapshot>>;
|
||||
|
||||
@@ -51,6 +51,8 @@ export interface EmployeeRecord {
|
||||
role: string;
|
||||
avatarEmoji: string | null;
|
||||
avatarColor: string | null;
|
||||
/** Small data-URL portrait; wins over emoji/initials when set. */
|
||||
avatarImage: string | null;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
@@ -73,6 +75,8 @@ export interface AgentRecord {
|
||||
lifecycle: string;
|
||||
avatarEmoji: string | null;
|
||||
avatarColor: string | null;
|
||||
/** Small data-URL portrait; wins over emoji/initials when set. */
|
||||
avatarImage: string | null;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ export const IPC_CHANNELS = {
|
||||
createAgent: "agentcompany:create-agent",
|
||||
updateAgent: "agentcompany:update-agent",
|
||||
updateEmployeeProfile: "agentcompany:update-employee-profile",
|
||||
setAutonomousPaused: "agentcompany:set-autonomous-paused",
|
||||
createTask: "agentcompany:create-task",
|
||||
updateTask: "agentcompany:update-task",
|
||||
deleteTask: "agentcompany:delete-task",
|
||||
|
||||
@@ -69,6 +69,8 @@ export interface UiPreferences {
|
||||
export interface AppSnapshot {
|
||||
activeOrgId: string | null;
|
||||
uiPreferences: UiPreferences;
|
||||
/** True while the operator has paused the autonomous run engine. */
|
||||
autonomousPaused: boolean;
|
||||
organizations: OrganizationRecord[];
|
||||
employees: EmployeeRecord[];
|
||||
agents: AgentRecord[];
|
||||
|
||||
Reference in new issue
Block a user