Pin the UI locale to the language setting and add theme + language selectors with a dark palette

This commit is contained in:
ZacharyZhang-NY committed 2026-07-07 12:28:06 -04:00
1 parent b30b9a3bc1
commit d404e1e72a
18 files changed
+176 -11

No files matched your search

+6 -1
View File
@@ -1,9 +1,14 @@
import type { ApprovalState, IdentitySource, PrincipalType, RiskLevel, RoleKey, TaskPriority, TaskStatus } from "../domain";
import type { ApprovalState, IdentitySource, PrincipalType, RiskLevel, RoleKey, TaskPriority, TaskStatus, UiLanguage, UiTheme } from "../domain";
export interface SetActiveOrganizationInput {
orgId: string;
}
export interface SetUiPreferencesInput {
theme?: UiTheme;
language?: UiLanguage;
}
export interface DeleteOrganizationInput {
orgId: string;
}
+2
View File
@@ -71,6 +71,7 @@ import type {
SearchInput,
SendMessageInput,
SetActiveOrganizationInput,
SetUiPreferencesInput,
SetFilePinnedInput,
SetFeatureFlagInput,
SetLegalHoldStateInput,
@@ -105,6 +106,7 @@ export interface DesktopApi {
loadSnapshot(): Promise<DesktopResult<AppSnapshot>>;
bootstrapOnboarding(input: BootstrapOnboardingInput): Promise<DesktopResult<BootstrapOnboardingSummary>>;
setActiveOrganization(input: SetActiveOrganizationInput): Promise<DesktopResult<AppSnapshot>>;
setUiPreferences(input: SetUiPreferencesInput): Promise<DesktopResult<AppSnapshot>>;
deleteOrganization(input: DeleteOrganizationInput): Promise<DesktopResult<AppSnapshot>>;
createOrganization(input: CreateOrganizationInput): Promise<DesktopResult<AppSnapshot>>;
createAgent(input: CreateAgentInput): Promise<DesktopResult<AppSnapshot>>;
+1 -1
View File
@@ -14,7 +14,7 @@ export type { MigrationCutoverEventRecord, MigrationReconciliationItemRecord, Ro
export { EVAL_SUITE_KEY, PR_BOT_GATE_KEY, SDLC_REVIEW_AGENT_KEY, SDLC_REVIEW_TARGET_TYPE, SDLC_RUN_STATE, type EvalCaseRecord, type EvalRunRecord, type EvalSuiteKey, type EvalSuiteRecord, type PrBotGateKey, type PrBotGateRecord, type SdlcReviewAgentKey, type SdlcReviewAgentRecord, type SdlcReviewRunRecord, type SdlcReviewTargetType, type SdlcRunState } from "./sdlc-domain";
export { SEARCH_ENTITY_TYPES, type SearchEntityType, type SearchResultRecord } from "./search-domain";
export type { BrowserActionPolicyRecord, BrowserActionRecord, BrowserSessionContainerRecord, SocialAccountGrantRecord, SocialAccountRecord, SocialApprovalRouteRecord, SocialAuditRecord } from "./social-domain";
export type { AppSnapshot } from "./snapshot-domain";
export type { AppSnapshot, UiLanguage, UiPreferences, UiTheme } from "./snapshot-domain";
export const TASK_STATUS = { BACKLOG: "backlog", IN_PROGRESS: "in_progress", REVIEW: "review", DONE: "done" } as const;
export const APPROVAL_STATE = { PENDING: "pending", APPROVED: "approved", DECLINED: "declined" } as const;
export const RISK_LEVEL = { LOW: "low", MEDIUM: "medium", HIGH: "high" } as const;
+1
View File
@@ -2,6 +2,7 @@ export const IPC_CHANNELS = {
loadSnapshot: "agentcompany:load-snapshot",
bootstrapOnboarding: "agentcompany:bootstrap-onboarding",
setActiveOrganization: "agentcompany:set-active-organization",
setUiPreferences: "agentcompany:set-ui-preferences",
deleteOrganization: "agentcompany:delete-organization",
createOrganization: "agentcompany:create-organization",
createAgent: "agentcompany:create-agent",
+9
View File
@@ -62,8 +62,17 @@ import type {
SocialAuditRecord,
} from "./social-domain";
export type UiTheme = "system" | "light" | "dark";
export type UiLanguage = "en" | "zh";
export interface UiPreferences {
theme: UiTheme;
language: UiLanguage;
}
export interface AppSnapshot {
activeOrgId: string | null;
uiPreferences: UiPreferences;
organizations: OrganizationRecord[];
employees: EmployeeRecord[];
agents: AgentRecord[];