Skip to content

Fix/remixer numbering - #913

Merged
jakeaturner merged 3 commits into
stagingfrom
fix/remixer-numbering
Aug 18, 2026
Merged

Fix/remixer numbering#913
jakeaturner merged 3 commits into
stagingfrom
fix/remixer-numbering

Conversation

@yghaemi

@yghaemi yghaemi commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR targets Remixer page numbering/slug behavior and improves publish/start-over UI interactions, while also refactoring how article types/templates are chosen based on page placement.

Changes:

  • Adjusts remixer path-segment numbering padding logic (including dotted numbering) and expands skip logic for certain page states.
  • Refactors article kind/template selection (topic-category/topic-guide/topic) and applies it during new/import/move flows.
  • Improves client UX: start-over pending state handling, publish log auto-scroll behavior, and title sanitization.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
server/util/remixerutils.ts Updates remixer path segment numbering padding + expands/adjusts skip rules.
server/api/services/remixer-service.ts Refactors article-kind/template selection; modifies publish job processing logic.
client/src/components/remixer/RemixerDashboard.tsx Uses mutation pending state to disable/hide book tree during “Start Over”.
client/src/components/remixer/PublishPanel.tsx Adds “sticky to bottom unless user scrolls up” behavior for publish messages.
client/src/components/remixer/EditPanel.tsx Changes how colons are handled when sanitizing titles.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 61 to +68
// Prefer formattedPath so autoNumbering `start` (incl. 0 → `00%3A_…`) is honored.
const numbering =
page.formattedPath?.trim() || page.numberedPath?.trim() || "";
return numbering
? `${numbering.padStart(2, "0")}:_${titleSegment}${siblingTitleIndexPostfix}`
page.numberedPath?.trim() ||page.formattedPath?.trim() || "";
const parts = numbering.split(".");
if (parts.length > 0) {
parts[parts.length - 1] = parts[parts.length - 1]!.padStart(2, "0");
}
const paddedNumbering = numbering ? parts.join(".") : "";
Comment on lines 133 to +138
export const shouldSkipPage = (page: RemixerSubPageState, inMatterBranch: boolean, status: RemixerPageStatus): boolean => {
const pathLen = page.pathNumber?.length ?? 0;
const isBookRoot = pathLen === 0;
return isBookRoot || inMatterBranch || status === "unchanged";
const pageStatus = getPageStatus(page);
const isDeleteNoExisting = page.isDeleted && (pageStatus === "imported" || pageStatus === "new") || false;
return isBookRoot || inMatterBranch || status === "unchanged" || isDeleteNoExisting;
autoNumbering,
);

console.log("title", title);
Comment on lines 1526 to 1530
if (status === "new") {
if(shouldSkip) {
return "success";
}
const parentId = page.parentID ?? "-1";
Comment on lines 1553 to 1557
} else if (status === "imported") {
if(shouldSkip) {
return "success";
}
const parentId = page.parentID ?? "-1";
Comment on lines +33 to +39
let s = value;
if (!allowColon) {
const colonIdx = value.indexOf(":");
if (colonIdx !== -1) {
s = value.slice(colonIdx + 1);
}
}
@jakeaturner
jakeaturner merged commit 30d910e into staging Aug 18, 2026
8 checks passed
@jakeaturner
jakeaturner deleted the fix/remixer-numbering branch August 18, 2026 23:12
@libretexts-bot

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 2.146.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants