Android: drop the orphaned page XMLs - #188
Merged
Merged
Conversation
Four Page XMLs under views/main/ (editor, debugger, game-console, learn) are dead: the shell navigates to the single real page views/main.xml, and the four screens are built programmatically by build*Screen() in the sibling .ts files, added as content views to the Adw.ViewStack. None of the handlers the XMLs declare (onNavigatingTo, onHelpToggleTap, ...) are exported by their .ts siblings, so they can't even serve as code-behind, and nothing in app/, the Vite/nativescript config, or Builder.load calls references these paths by string. editor.xml also carried a hardcoded Quick Help text that already misled one review into treating it as the live source; the real content is QuickHelpView, sourced from packages/learn/quick-help.mdx. learn.css goes with learn.xml: NativeScript's same-basename page stylesheet convention was its only reference.
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.
Summary
Four
PageXMLs underpackages/app-android/app/views/main/—editor.xml,debugger.xml,game-console.xml,learn.xml— are dead code left over fromthe pre-Adwaita Material shell.
app/app-root.xmlhasdefaultPage="views/main",which resolves to the real page
app/views/main.xml+ its code-behindapp/views/main.ts; that file builds the four screens programmatically viabuildEditorScreen()/buildDebuggerScreen()/buildGameConsoleScreen()/buildLearnScreen()and adds them as content views to the shell'sAdw.ViewStack. The four XMLs are never loaded as pages, and their sibling.tsfiles don't even export the handlers the XML markup declares, so theycan't serve as code-behind either.
Per-file evidence
editor.xml: declaresonNavigatingTo,onNavigatingFrom,onHelpToggleTap— none exported byeditor.ts. It also carries ahardcoded Quick Help text that already misled a prior review into treating
it as the live source; the real content comes from
QuickHelpView(
app/mdx/quick-help-view.ts), sourced frompackages/learn/quick-help.mdxvia
Builder.load({ path: "~/mdx", ... }), unrelated to this file.debugger.xml: declaresonNavigatingTo,onNavigatingFrom— neitherexported by
debugger.ts, which only exportsbuildDebuggerScreen()anddebuggerView.game-console.xml: declaresonLoaded,onUnloaded,onNavigatingTo,onNavigatingFrom— none exported bygame-console.ts, which only exportsbuildGameConsoleScreen(),gameConsoleView,gameConsoleController.learn.xml: declaresonNavigatingTo,onNavigatingFrom— neitherexported by
learn.ts, which only exportsbuildLearnScreen()andlearnView.learn.css: not referenced anywhere by name or class; it was only everpicked up implicitly through NativeScript's same-basename page-stylesheet
convention with
learn.xml, so it goes with it.A repo-wide grep for each path/filename, for
Builder.load/Frame.navigatecall sites, and for the four filenames in
nativescript.config.ts,vite.config.tsandpackage.jsonfound nothing.w:SourceViewandmdx:TutorialView, the two widgets the dead XMLs also reference, stay: bothare real classes imported and used by the live
editor.ts/learn.tsscreen builders too.
Validation
gjsify install— first run in this worktree (no priornode_modules),~14s, 1174 packages across 10 workspaces.
gjsify format— clean, touched nothing besides intent.gjsify format --check— clean.gjsify buildat the repo root fails onUNRESOLVED_ENTRY src/index.ts—a pre-existing mismatch (the root has no bundle entry point; the root
buildscript isgjsify foreach --topological-dev build, not plaingjsify build), unrelated to this change.gjsify workspace @learn6502/app-android checkreports 58 pre-existingTS2307 Cannot find module '@learn6502/core'errors —@learn6502/corehas no
dist/yet in this fresh worktree. None of the errors reference thedeleted files or their (non-existent) handlers.
ns build android(NativeScript CLI +Gradle, Android SDK present on this machine) — ran to completion: Vite
transformed 660 modules with no errors, Gradle built successfully in ~48s,
and produced
platforms/android/app/build/outputs/apk/debug/app-debug.apk.This is the strongest available evidence that nothing references the
deleted files.
Test plan
app/, build configs, or bundler config.tsfiles
gjsify format/gjsify format --checkcleanns build androidproduces a working debug APK with the files removed🤖 Generated with Claude Code