Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

address review (codex): show effective default effort in the queue row; drop fixed retry-effort id

[._.]/ Adam Eivyc008123321b4
diff --git a/client/src/components/media/MediaJobsQueue.jsx b/client/src/components/media/MediaJobsQueue.jsx
index a0079813d0..2ffae04a5d 100644
--- a/client/src/components/media/MediaJobsQueue.jsx
+++ b/client/src/components/media/MediaJobsQueue.jsx
@@ -5,7 +5,7 @@ import ConfirmButtonPair from '../ui/ConfirmButtonPair';
import { FormField } from '../ui/FormField';
import { listMediaJobs, cancelMediaJob, cancelQueuedMediaJobs, deleteMediaJob, retryMediaJob, runMediaJobNow } from '../../services/apiMediaJobs.js';
import { listLoraTrainingCheckpoints } from '../../services/apiLoraTraining.js';
-import { IMAGE_GEN_MODE } from '../../lib/imageGenBackends';
+import { IMAGE_GEN_MODE, CODEX_IMAGEGEN_DEFAULT_EFFORT } from '../../lib/imageGenBackends';
import { CODEX_EFFORT_LEVELS } from '../../utils/providers';
import { lossSparklineGeometry } from '../../lib/lossSparkline';
import { useAutoRefetch } from '../../hooks/useAutoRefetch';
@@ -34,9 +34,12 @@ function modelLabel(params) {
}
if (params.mode === IMAGE_GEN_MODE.CODEX) {
const m = (params.model || '').trim();
- const eff = (params.effort || '').trim();
+ // Resolve an absent effort to the shipped default — a job that ran on the
+ // default stores no `effort`, but codex.js still rendered it at `low`, so
+ // the row must show the effective level, not a blank.
+ const eff = (params.effort || '').trim() || CODEX_IMAGEGEN_DEFAULT_EFFORT;
const base = m ? `codex / ${m}` : 'codex';
- return eff ? `${base} · ${eff}` : base;
+ return `${base} · ${eff}`;
}
const id = (params.modelId || '').trim();
if (!id) return 'local';
@@ -546,13 +549,14 @@ function EditRetryForm({ job, onSubmit, onCancel }) {
</div>
{isCodex && (
<FormField label="Reasoning effort" labelClassName="block text-[10px] uppercase tracking-wide text-port-text-muted">
+ {/* No fixed id — FormField wires the label to a useId()-generated id,
+ so two retry editors open at once don't collide on one shared id. */}
<select
- id="retry-codex-effort"
value={effort}
onChange={(e) => setEffort(e.target.value)}
className="w-full px-2 py-1 bg-port-bg border border-port-border rounded text-white text-xs"
>
- <option value={EFFORT_DEFAULT_OPTION}>Default (low)</option>
+ <option value={EFFORT_DEFAULT_OPTION}>Default ({CODEX_IMAGEGEN_DEFAULT_EFFORT})</option>
{CODEX_EFFORT_LEVELS.map((lvl) => (
<option key={lvl} value={lvl}>{lvl}</option>
))}
diff --git a/client/src/components/media/MediaJobsQueue.test.jsx b/client/src/components/media/MediaJobsQueue.test.jsx
index 62a210d254..5db4541890 100644
--- a/client/src/components/media/MediaJobsQueue.test.jsx
+++ b/client/src/components/media/MediaJobsQueue.test.jsx
@@ -71,6 +71,16 @@ async function expandReel(user) {
await user.click(toggle);
}
+const failedCodexDefaultEffortJob = {
+ id: 'codexdef00000dead',
+ kind: 'image',
+ status: 'failed',
+ error: 'boom',
+ queuedAt: '2026-06-19T10:00:00Z',
+ // No explicit effort → ran on the shipped default.
+ params: { prompt: 'a fox', mode: 'codex', model: 'gpt-5.6-luna' },
+};
+
describe('MediaJobsQueue — Codex reasoning-effort retry control', () => {
it('surfaces the job effort in the row label', async () => {
const user = userEvent.setup();
@@ -80,6 +90,28 @@ describe('MediaJobsQueue — Codex reasoning-effort retry control', () => {
await waitFor(() => expect(screen.getByText(/codex \/ gpt-5.6-luna · high/)).toBeInTheDocument());
});
+ it('shows the effective default effort in the row label when the job stored none', async () => {
+ const user = userEvent.setup();
+ listMediaJobs.mockResolvedValue([failedCodexDefaultEffortJob]);
+ render(<MediaJobsQueue kind="image" />);
+ await expandReel(user);
+ // Default-effort jobs store no `effort`, but codex still rendered at `low`.
+ await waitFor(() => expect(screen.getByText(/codex \/ gpt-5.6-luna · low/)).toBeInTheDocument());
+ });
+
+ it('pre-fills the retry editor to Default for a job that stored no effort', async () => {
+ const user = userEvent.setup();
+ listMediaJobs.mockResolvedValue([failedCodexDefaultEffortJob]);
+ render(<MediaJobsQueue kind="image" />);
+ await expandReel(user);
+ await user.click(await screen.findByLabelText('Edit and retry'));
+ const select = await screen.findByLabelText('Reasoning effort');
+ expect(select.value).toBe('default');
+ // Leaving it on Default and retrying sends no effort override (nothing changed).
+ await user.click(screen.getByRole('button', { name: /Retry with changes/i }));
+ expect(retryMediaJob).toHaveBeenCalledWith('codexdef00000dead', null, { silent: true });
+ });
+
it('renders the effort select (Codex only) and pins a new level on retry', async () => {
const user = userEvent.setup();
listMediaJobs.mockResolvedValue([failedCodexJob]);
diff --git a/client/src/components/settings/ImageGenTab.jsx b/client/src/components/settings/ImageGenTab.jsx
index c53fb9b09c..dc80462068 100644
--- a/client/src/components/settings/ImageGenTab.jsx
+++ b/client/src/components/settings/ImageGenTab.jsx
@@ -22,7 +22,7 @@ import {
registerTool, updateTool, getToolsList,
getHfTokenStatus, saveHfToken, clearHfToken,
} from '../../services/api';
-import { IMAGE_GEN_MODE } from '../../lib/imageGenBackends';
+import { IMAGE_GEN_MODE, CODEX_IMAGEGEN_DEFAULT_EFFORT } from '../../lib/imageGenBackends';
import { resolveCleanersFromConfig } from '../../lib/imageCleaners';
import { useMediaJobSse } from '../../hooks/useMediaJobSse';
import { CODEX_EFFORT_LEVELS } from '../../utils/providers';
@@ -31,9 +31,11 @@ const SDAPI_TOOL_ID = 'sdapi';
const CODEX_TOOL_ID = 'codex-imagegen';
// Mirror of server/services/imageGen/modes.js — shown as placeholder/default
// hints so the user sees what a blank Model / Effort field will actually use.
-// The server owns the real default; these are display-only.
+// The server owns the real default; these are display-only. The effort default
+// lives in the shared imageGenBackends lib (imported above) so the Render Queue
+// and this settings form don't drift; the model default stays local (only used
+// here as a placeholder string).
const CODEX_IMAGEGEN_DEFAULT_MODEL = 'gpt-5.6-luna';
-const CODEX_IMAGEGEN_DEFAULT_EFFORT = 'low';
const DEFAULT_TEST_PROMPT = 'a small cyberpunk fox sitting on a neon-lit rooftop at night, cinematic, highly detailed';
const normalizeUrl = (url) => (url || '').trim().replace(/\/+$/, '');
diff --git a/client/src/lib/imageGenBackends.js b/client/src/lib/imageGenBackends.js
index a2f655fe64..db45ac6c29 100644
--- a/client/src/lib/imageGenBackends.js
+++ b/client/src/lib/imageGenBackends.js
@@ -2,6 +2,13 @@ import { Cpu, Terminal, Cloud } from 'lucide-react';
export const IMAGE_GEN_MODE = Object.freeze({ LOCAL: 'local', CODEX: 'codex', EXTERNAL: 'external' });
+// Shipped default Codex reasoning-effort level — the client mirror of the
+// server's CODEX_IMAGEGEN_DEFAULT_EFFORT (server/services/imageGen/modes.js).
+// A Codex job with no explicit effort renders at this level, so any UI that
+// displays or pre-fills "the effort a job used" must resolve an absent value to
+// this default rather than showing a blank.
+export const CODEX_IMAGEGEN_DEFAULT_EFFORT = 'low';
+
const META = {
[IMAGE_GEN_MODE.LOCAL]: { label: 'Local', icon: Cpu },
[IMAGE_GEN_MODE.CODEX]: { label: 'Codex', icon: Terminal },