Repository navigation
v60: plan for splitting app/main.js (docs only) - #61
Merged
Merged
Conversation
docs/plans/APP_MAIN_SPLIT.md is a step-by-step plan (for Codex to follow exactly) that splits the PDF app's app/main.js into 12 smaller files without changing anything the app does. No app code changes in this commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
docs/plans/APP_MAIN_SPLIT.md: a step-by-step plan for Codex 6.1 Terra to splitapp/main.js(1,829 lines) into 12 smaller files inapp/, without changing anything a teacher sees or does. This PR doesn't change any app code. The refactor itself will be a separate PR.How the plan works
doc, ink data, language, save state, chapters). Once the code is in separate files, other files can't assign those variables directly.initX()function.main.jscalls these in today's order, so listeners and shortcuts are still set up in the same order.state.js,core.js,saving.js,open.js,start-screen.js,page-view.js,menus.js,tools.js,settings.js,toolbar.js,notebook-ui.jsandexporting.js. Each phase lists the exact line ranges, the import lines and the exports. Until a file exists, its names are imported from./main.jsfor the time being.A checkpoint after every phase runs Prettier,
tools/build.py/--check, a grep for leftover top-level start-up code, andnpx playwright test. The plan stops ifapp/main.jshas changed since0603cec, since its line numbers would be out of date.Nothing moves into or out of
shared/, and the overlay is untouched. The app is still plain ES modules with no build step;tools/build.pypicks up the new files for the version stamp and the offline copy.Also: version v60, a changelog line, and
python3 tools/build.py.🤖 Generated with Claude Code