Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
6c0f8f4
Add subdivision-aware milestone pagination resolver
Luke-Bilhorn Apr 22, 2026
44bb039
Handle milestone subdivision writes with source→target mirroring
Luke-Bilhorn Apr 22, 2026
f1185b7
Thread resolver subdivisions through the editor webview
Luke-Bilhorn Apr 22, 2026
2ea9e94
Allow renaming milestone subdivisions from the accordion
Luke-Bilhorn Apr 23, 2026
cd4b360
Add per-subsection delete and per-milestone reset controls (source only)
Luke-Bilhorn Apr 23, 2026
a918277
Add addMilestoneSubdivisionAnchor handler + shared commit pipeline
Luke-Bilhorn Apr 23, 2026
4dbf6df
Add inline "Add break at cell…" form to milestone accordion (source o…
Luke-Bilhorn Apr 23, 2026
14d057a
Add useSubdivisionNumberLabels setting to force numeric subsection la…
Luke-Bilhorn Apr 23, 2026
e6703ba
Surface cellsPerPage and useSubdivisionNumberLabels in Interface Sett…
Luke-Bilhorn Apr 23, 2026
9720c19
Refresh paired target webview after source-side subdivision placement…
Luke-Bilhorn Apr 24, 2026
4d36bc2
Move subdivision edit affordances behind a gear/settings toggle
Luke-Bilhorn Apr 24, 2026
1fe3441
Adaptive chunking, maxSubdivisionLength setting, and named-break pers…
Luke-Bilhorn Apr 24, 2026
94dded1
Surface maxSubdivisionLength in Interface Settings; polish copy
Luke-Bilhorn Apr 24, 2026
3123402
Accordion: red trash-can icons and phantom spacer for vertical alignment
Luke-Bilhorn Apr 24, 2026
8f792af
Use disabled icon button for non-deletable trash icon.
Luke-Bilhorn Apr 24, 2026
49d3d2f
Tweak milestone row icon spacing.
Luke-Bilhorn Apr 24, 2026
dae9ae7
MilestoneAccordion: fix rename click behavior
Luke-Bilhorn Apr 24, 2026
9f0665c
Merge pull request #928 from genesis-ai-dev/main
Luke-Bilhorn Apr 27, 2026
dbfaf25
Merge branch '867-make-milestone-subdivisions-for-rendering-editable'…
Luke-Bilhorn Apr 27, 2026
f9cd816
Merge branch 'main' into 867-make-milestone-subdivisions-for-renderin…
Luke-Bilhorn Apr 29, 2026
67e9190
Merge branch 'main' into 867-make-milestone-subdivisions-for-renderin…
Luke-Bilhorn Apr 29, 2026
98a3160
Merge branch 'main' into 867-make-milestone-subdivisions-for-renderin…
Luke-Bilhorn Apr 30, 2026
d6d98ff
Fix tests on milestone subdivisions
Luke-Bilhorn Apr 30, 2026
938363e
Merge branch 'main' into 867-make-milestone-subdivisions-for-renderin…
Luke-Bilhorn May 1, 2026
9e452c2
Fix MilestoneAccordion tests for new per-row rename UI
Luke-Bilhorn May 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 32 additions & 22 deletions package-lock.json

Large diffs are not rendered by default.

17 changes: 16 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -941,11 +941,26 @@
"description": "Text direction for the editor (left-to-right or right-to-left)"
},
"codex-editor-extension.cellsPerPage": {
"title": "Cells Per Page",
"type": "number",
"default": 50,
"minimum": 5,
"maximum": 200,
"description": "Number of cells to display per page when a chapter has many cells. Helps with performance for large chapters."
"description": "Default page size for milestones without custom subdivision breaks. Applies only as a fallback when a milestone has no user-defined subdivisions."
},
"codex-editor-extension.useSubdivisionNumberLabels": {
"title": "Always Show Subdivision Number Ranges",
"type": "boolean",
"default": false,
"description": "When enabled, milestone subdivisions always display their numeric cell range (e.g. '6-15') even if a user-assigned name exists. When disabled, names take precedence and the range is shown only as a muted suffix."
},
"codex-editor-extension.maxSubdivisionLength": {
"title": "Maximum Subdivision Length",
"type": "number",
"default": 0,
"minimum": 0,
"maximum": 5000,
"description": "Maximum number of cells the editor will leave inside a single subdivision. Stretches between user-defined breaks that exceed this length are sub-chunked using 'Cells Per Page'. Set to 0 to disable (in which case 'Cells Per Page' itself acts as the threshold). Useful when you want a higher 'Cells Per Page' default but still allow short logical pages between custom breaks to remain unbroken."
},
"codex-editor-extension.useOnlyValidatedExamples": {
"title": "Use Only Validated Examples",
Expand Down
69 changes: 69 additions & 0 deletions src/interfaceSettings/interfaceSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,20 @@ export async function openInterfaceSettings() {
const sendInit = () => {
const config = vscode.workspace.getConfiguration("codex-editor-extension");
const highlightSearchResults = config.get<boolean>("highlightSearchResults", true);
const cellsPerPage = config.get<number>("cellsPerPage", 50);
const useSubdivisionNumberLabels = config.get<boolean>(
"useSubdivisionNumberLabels",
false
);
const maxSubdivisionLength = config.get<number>("maxSubdivisionLength", 0);

panel.webview.postMessage({
command: "init",
data: {
highlightSearchResults,
cellsPerPage,
useSubdivisionNumberLabels,
maxSubdivisionLength,
},
});
};
Expand Down Expand Up @@ -99,6 +108,66 @@ export async function openInterfaceSettings() {
);
break;
}

case "updateCellsPerPage": {
// Clamp to the range declared in package.json so invalid input
// cannot corrupt pagination. Pull bounds from the schema-defined
// minimum/maximum rather than hardcoding them in multiple places.
const raw = Number(message.value);
if (!Number.isFinite(raw)) break;
const clamped = Math.max(5, Math.min(200, Math.round(raw)));
const config = vscode.workspace.getConfiguration("codex-editor-extension");
await config.update(
"cellsPerPage",
clamped,
vscode.ConfigurationTarget.Workspace
);
break;
}

case "updateUseSubdivisionNumberLabels": {
const config = vscode.workspace.getConfiguration("codex-editor-extension");
await config.update(
"useSubdivisionNumberLabels",
Boolean(message.value),
vscode.ConfigurationTarget.Workspace
);
break;
}

case "updateMaxSubdivisionLength": {
// 0 means "off" — the resolver falls back to using `cellsPerPage`
// as the threshold. Anything else is clamped to the package.json
// bounds so corrupted input can't sneak through.
const raw = Number(message.value);
if (!Number.isFinite(raw)) break;
const rounded = Math.round(raw);
const clamped = rounded <= 0 ? 0 : Math.max(0, Math.min(5000, rounded));
const config = vscode.workspace.getConfiguration("codex-editor-extension");
await config.update(
"maxSubdivisionLength",
clamped,
vscode.ConfigurationTarget.Workspace
);
break;
}
}
});

// Keep the panel in sync when settings change from elsewhere (e.g. the
// VS Code Settings UI). Disposed together with the panel below.
const configListener = vscode.workspace.onDidChangeConfiguration((e) => {
if (
e.affectsConfiguration("codex-editor-extension.highlightSearchResults") ||
e.affectsConfiguration("codex-editor-extension.cellsPerPage") ||
e.affectsConfiguration("codex-editor-extension.useSubdivisionNumberLabels") ||
e.affectsConfiguration("codex-editor-extension.maxSubdivisionLength")
) {
sendInit();
}
});

panel.onDidDispose(() => {
configListener.dispose();
});
}
Loading
Loading