feat: refresh dashboard settings UX and Codex feature toggles (#153)

* feat: refresh dashboard settings UX and Codex feature toggles

Improve settings/tasks mobile layout, model effort validation by agent type, and preset models for GPT 5.5 and Opus 4.7. Store Codex fast mode and goals in config.toml with Claude fastMode session sync and updated docs for Codex 0.133.

Co-authored-by: Cursor <cursoragent@cursor.com>

* style: apply pre-commit formatting after dashboard settings commit

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Eyejoker
2026-05-23 12:18:42 +09:00
committed by GitHub
parent 58e5197dc6
commit fd3145e2a7
37 changed files with 3785 additions and 1910 deletions

View File

@@ -53,6 +53,7 @@ vi.mock('../service-routing.js', () => ({
type Handler = (...args: any[]) => any;
const clientRef = vi.hoisted(() => ({ current: null as any }));
const loginShouldRejectRef = vi.hoisted(() => ({ value: false }));
vi.mock('discord.js', () => {
const Events = {
@@ -89,6 +90,9 @@ vi.mock('discord.js', () => {
}
async login(_token: string) {
if (loginShouldRejectRef.value) {
throw new Error('An invalid token was provided.');
}
this._ready = true;
// Fire the ready event
const readyHandlers = this.eventHandlers.get('ready') || [];
@@ -233,6 +237,7 @@ describe('DiscordChannel', () => {
beforeEach(() => {
vi.clearAllMocks();
hasReviewerLeaseMock.mockReturnValue(false);
loginShouldRejectRef.value = false;
});
afterEach(() => {
@@ -263,6 +268,17 @@ describe('DiscordChannel', () => {
expect(channel.isConnected()).toBe(true);
});
it('rejects connect() when login fails', async () => {
loginShouldRejectRef.value = true;
const opts = createTestOpts();
const channel = new DiscordChannel('bad-token', opts);
await expect(channel.connect()).rejects.toThrow(
'An invalid token was provided.',
);
expect(channel.isConnected()).toBe(false);
});
it('registers message handlers on connect', async () => {
const opts = createTestOpts();
const channel = new DiscordChannel('test-token', opts);

View File

@@ -239,7 +239,7 @@ export class DiscordChannel implements Channel {
logger.error({ err: err.message }, 'Discord client error');
});
return new Promise<void>((resolve) => {
return new Promise<void>((resolve, reject) => {
this.client!.once(Events.ClientReady, (readyClient) => {
logger.info(
{ username: readyClient.user.tag, id: readyClient.user.id },
@@ -252,7 +252,7 @@ export class DiscordChannel implements Channel {
resolve();
});
this.client!.login(this.botToken);
void this.client!.login(this.botToken).catch(reject);
});
}