Add room skill setting mutations (#133)

* add gated codex goals support

* sync README SDK versions

* bump claude agent sdk

* add codex goals settings toggle

* reuse status dashboard message and simplify settings actions

* refine settings page UX

* fix settings nav hash routing

* add dashboard UX verification

* refine dashboard settings and inbox UX

* remove inbox top-level navigation

* remove dashboard health top-level navigation

* fix: allow runtime image attachment paths

* feat: configure attachment allowlist dirs

* fix: clean duplicate dashboard status messages

* fix: poll dashboard duplicate cleanup between status updates

* fix: delete dashboard duplicates on create

* Refine settings IA with tabbed sections

* Add read-only runtime inventory settings

* Fix runtime inventory MCP JSON parsing

* Add room skill settings inventory

* Add room skill setting mutations
This commit is contained in:
Eyejoker
2026-05-04 03:27:35 +09:00
committed by GitHub
parent e90703d124
commit 85da2b918c
11 changed files with 577 additions and 17 deletions

View File

@@ -11,6 +11,8 @@ interface MockApiState {
codexFeatureUpdates: number;
ciWatcherFailures: number;
restartRequests: number;
roomSkillUpdates: number;
roomSkillsDisableCodexBrowser: boolean;
}
const seriousImpacts = new Set(['serious', 'critical']);
@@ -27,7 +29,7 @@ async function main() {
'settings nav keeps hash route stable',
browser,
baseUrl,
async (page) => {
async (page, state) => {
await openSettings(page, baseUrl);
const originalUrl = page.url();
@@ -52,6 +54,17 @@ async function main() {
await assertVisible(page.locator('#settings-runtime'));
await page.getByText('Runtime inventory').waitFor();
await page.getByText('EJClaw bridge').waitFor();
const codexPolicy = page
.locator('.runtime-room-agent-policy')
.filter({ hasText: 'Codex' })
.first();
const codexBrowserToggle = codexPolicy
.locator('input[type="checkbox"]')
.first();
assert.equal(await codexBrowserToggle.isChecked(), true);
await codexBrowserToggle.click();
await codexPolicy.getByText('1개 OFF').waitFor();
assert.equal(state.roomSkillUpdates, 1);
await page
.locator(
@@ -225,6 +238,8 @@ function createMockApiState(): MockApiState {
codexFeatureUpdates: 0,
ciWatcherFailures: 0,
restartRequests: 0,
roomSkillUpdates: 0,
roomSkillsDisableCodexBrowser: false,
};
}
@@ -319,8 +334,7 @@ async function handleMockApi(route: Route, state: MockApiState) {
return;
}
if (method === 'GET' && url.pathname === '/api/settings/room-skills') {
await fulfillJson(route, roomSkillSettingsFixture());
if (await handleMockRoomSkillRoute(route, state, url, method)) {
return;
}
@@ -419,6 +433,33 @@ async function handleMockApi(route: Route, state: MockApiState) {
);
}
async function handleMockRoomSkillRoute(
route: Route,
state: MockApiState,
url: URL,
method: string,
): Promise<boolean> {
if (url.pathname !== '/api/settings/room-skills') return false;
if (method === 'GET') {
await fulfillJson(route, roomSkillSettingsFixture(state));
return true;
}
if (method !== 'PATCH' && method !== 'PUT') return false;
const body = parseJsonBody(route.request().postData());
if (
body.roomJid === 'room@example' &&
body.agentType === 'codex' &&
body.skillId === 'codex-user:agent-browser' &&
body.enabled === false
) {
state.roomSkillUpdates += 1;
state.roomSkillsDisableCodexBrowser = true;
}
await fulfillJson(route, roomSkillSettingsFixture(state));
return true;
}
function mockOverview(state: MockApiState) {
return {
generatedAt: MOCK_TIME,
@@ -588,7 +629,8 @@ function runtimeInventoryFixture() {
};
}
function roomSkillSettingsFixture() {
function roomSkillSettingsFixture(state?: MockApiState) {
const codexDisabled = state?.roomSkillsDisableCodexBrowser === true;
return {
generatedAt: '2026-05-04T00:00:00.000Z',
catalog: [
@@ -629,17 +671,16 @@ function roomSkillSettingsFixture() {
agents: [
{
agentType: 'codex',
mode: 'all-enabled',
mode: codexDisabled ? 'custom' : 'all-enabled',
availableSkillIds: [
'codex-user:agent-browser',
'runner:agent-browser',
],
disabledSkillIds: [],
disabledSkillIds: codexDisabled ? ['codex-user:agent-browser'] : [],
explicitEnabledSkillIds: [],
effectiveEnabledSkillIds: [
'codex-user:agent-browser',
'runner:agent-browser',
],
effectiveEnabledSkillIds: codexDisabled
? ['runner:agent-browser']
: ['codex-user:agent-browser', 'runner:agent-browser'],
},
{
agentType: 'claude-code',