Repository navigation
chore: docs and MCP content for catalyst-core 1.2.x, 1.2.1 release page - #622
mayansharma wants to merge 3 commits into
Conversation
Add the 1.2.0 release story page with its poster and card stills, and fill gaps the 1.2.0 audit found: hooks inside export default are never called (with the startup warning), window.__CATALYST_SPLASH__ for the HTML splash, and credentials/, build-output/, .catalyst/, public/icon.png and public/splashscreen.html in the project structure page.
- public/icon.png is the primary app icon on 1.2.0+: the App Icon KB entry, conversion tasks T13/T14 and check_config (1024px, square, ANDROID-010, IOS-005, IOS-006) now say so; older versions keep the sized-set checks. - get_build_flow: android/ios blocks are optional on 1.2.0, the iOS signing order matches the build, the signed APK and the debug APK are listed, and apps before 1.2.0 get the buildApp flows. - KB: server/index.js named-export hooks and the ignored export default, 1.1.0/1.2.0 in Runtime Generations, and known errors for NATIVE-003, NATIVE-001, NATIVE-010, the LAN-address rewrite and the phone no longer picked by default. - check_config names NATIVE-010 as a 1.2.0 breaking change. - context.md: version, appId precedence, splashScreen placement, SSR hooks, release outputs, iOS signing, icons and the 1.2.0 changes.
|
DeputyDev has started reviewing your pull request. |
| { | ||
| "section": "known_errors", | ||
| "title": "NATIVE-003 release refuses a placeholder app id (1.2.0)", | ||
| "content": "Symptom: a release build fails with NATIVE-003 Release build uses a placeholder app id, or a terminal run asks for an app id. Cause: since catalyst-core 1 2 0 a release refuses a placeholder id, meaning any com example id or a template id like io yourname androidproject, com catalyst framework app or com debug webview, from appId or the platform key that wins over it. Fix: set WEBVIEW_CONFIG.appId in config/config.json to your own reverse-DNS id such as com.acme.shop. android.packageName and ios.bundleIdentifier (then ios.appBundleId) win over appId, so fix or remove a placeholder there too. Run in a terminal, the release asks once and saves the answer; in CI it fails instead. The id cannot change after the first store upload. Debug builds still accept placeholders.", |
There was a problem hiding this comment.
DOCUMENTATION: Preserve the punctuation in these copyable values. This entry currently renders 1.2.0 as 1 2 0, com.example as com example, and reverse-DNS examples such as com.acme.my_shop with spaces; the same formatting recurs in the other new troubleshooting entries. As written, the knowledge base presents invalid versions and configuration examples.
Users following the troubleshooting text cannot copy the displayed version and bundle-ID values as valid configuration.
Use the literal values `catalyst-core 1.2.0`, `com.example`, `io.yourname.androidproject`, `com.catalyst.framework.app`, `com.debug.webview`, and `com.acme.my_shop`, preserving their punctuation.
|
|
||
| /** True when public/ios/appIcons exists: the iOS build then uses it instead of icon.png. */ | ||
| function hasIosSizedIcons(root) { | ||
| return fs.existsSync(path.join(root, "public", "ios", "appIcons")) |
There was a problem hiding this comment.
CODE_MAINTAINABILTIY: hasIosSizedIcons treats any existing public/ios/appIcons path as an override, but the native builder requires at least one recognized icon-{size}-{scale} image. An empty directory or one containing unrelated files therefore suppresses public/icon.png validation even though the native build falls back to that file, allowing IOS-005/IOS-006 failures to pass check_config. Mirror the native recursive filename and extension check instead of testing directory existence.
The MCP predicate and native selector choose different icon sources, so the validator can skip checks for the icon actually used by the build.
Make `hasIosSizedIcons` recursively require at least one recognized `icon-{size}-{scale}.{png|jpg|jpeg}` file, returning false for an empty or unrelated directory.
| if (isRelease && !ctx.wv.ios?.developmentTeam && !ctx.wv.ios?.provisioningProfile) { | ||
| warnings.push( | ||
| "ios.developmentTeam not set. A release fails with IOS-010 unless credentials/ios/ holds a .p12 and its provisioning profile." | ||
| if (!pre120 && isRelease && !ctx.wv.ios?.developmentTeam && !ctx.wv.ios?.provisioningProfile) { |
There was a problem hiding this comment.
CODE_MAINTAINABILTIY: The !pre120 guard removes the existing missing-signing warning from every pre-1.2 iOS release. Those projects are still routed to PRE_120_NATIVE_FLOWS.ios_release, whose archive steps require Xcode signing configuration. Preserve the legacy warning for pre-1.2 releases, and use this new installed-profile/Xcode-account note only for 1.2.0+.
Pre-1.2 release guidance no longer reports missing signing configuration after the warning was restricted to current versions.
Add a `pre120 && isRelease` branch that emits the legacy missing-signing warning when neither `ios.developmentTeam` nor `ios.provisioningProfile` is set, and retain the new note in the 1.2.0+ branch.
| message: | ||
| "public/icon.png has an alpha channel. Debug builds only warn, but an iOS release fails with IOS-006 because the App Store rejects icons with transparency. Flatten it onto a solid background.", | ||
| } | ||
| if (String((wc.ios || {}).buildType || "").toLowerCase() === "release") |
There was a problem hiding this comment.
CODE_MAINTAINABILTIY: IOS-006 is promoted to an error only when deprecated WEBVIEW_CONFIG.ios.buildType equals release. The documented npm run ios:release/--release path does not require that field, and check_config accepts no release-mode argument, so a normal release configuration reports only a warning even though the native release build rejects the icon. Add and propagate an explicit release/mode input when determining severity.
The validator cannot observe the supported release invocation and understates a native IOS-006 release failure.
Extend `handle_check_config` and its tool schema with a `release` or `mode` argument, compute release status from that input with the legacy `ios.buildType` check as a fallback, and use it for the IOS-006 severity decision.
| // | ||
| /** T13/T14 on 1.2.0+: public/icon.png, unless the platform's sized icons replace it. Null before 1.2.0. */ | ||
| function singleIconStatus(p) { | ||
| if (installedVersion && versionOlderThan(installedVersion, SINGLE_APP_ICON_MIN_VERSION)) return null |
There was a problem hiding this comment.
CODE_MAINTAINABILTIY: When installedVersion is absent, this condition skips the legacy gate and silently applies the 1.2.0 single-icon rules. check_config now falls back through installedCatalystVersion(root), while conversion status reads only _projectInfo.installedVersion, so the tools can classify the same pre-1.2 project differently. Reuse one version-resolution path and avoid treating an unknown version as current for this version-gated task.
A pre-1.2 project with only public/icon.png can be accepted by conversion status even though that runtime requires sized icon sets.
Resolve the Catalyst version through the shared resolver before evaluating T13/T14; if no exact version is available, return an unknown or needs-review result rather than entering the 1.2.0 branch.
| // From 1.2.0 public/icon.png is the app icon on both platforms; the sized | ||
| // sets in public/<platform>/appIcons are optional overrides. Before | ||
| // 1.2.0 only the sized sets count. | ||
| T13_ANDROID_ICONS: () => singleIconStatus("android") || legacyAndroidIconStatus(), |
There was a problem hiding this comment.
ERROR: For 1.2.0+, singleIconStatus returns null when a sized override exists, so these || legacy... expressions run the legacy full-set checks. Valid current projects with a partial override or supported JPEG, such as icon-mdpi.jpg, are consequently reported as gaps because the legacy checks demand every .png. Return completed for a recognized current-version override and reserve the legacy detectors for versions older than 1.2.0.
Conversion status rejects icon sets that the current native Android and iOS builders accept.
For 1.2.0+, return `{ status: "completed" }` when the platform has at least one recognized sized override; call `legacyAndroidIconStatus` or `legacyIosIconStatus` only for pre-1.2 versions.
|
DeputyDev has completed a review of your pull request for commit 6329b6d. |
….1.0 1.2.1 shipped four days after 1.2.0, so the story page, film and poster move to 1.2.1 and cover both releases, including openInBrowser, the X-App-Info header and the iOS edge-to-edge inset change. 1.2.0 keeps a plain page with its changelog section, like 1.0.2.
|
Moved to #624 after renaming the branch. |
…ge (#624) Docs and MCP content for catalyst-core 1.2.0. No framework behaviour change. Each gap from the 1.2.0 audit was checked against the code before it was fixed. ## Docs - Release story for 1.2.1, covering everything since 1.1.0: `docs/release-stories/1.2.1.mdx`, a 1.2.1 entry at the top of `docs/release-pages.json` with the release film, the poster `docs/static/img/releases/1.2.1.jpg` and three card stills in `docs/static/img/releases/1.2.1/`, cut from the film retitled to 1.2.1. 1.2.0 gets a plain entry with its changelog section and no film, the way 1.0.2 is handled, since 1.2.1 followed four days later. - SSR Lifecycle: hooks inside `export default {}` in `server/index.js` are never called, and startup warns about them since 1.2.0 (`src/scripts/preServerInit.js`). - Universal app configuration, HTML splash: documents `window.__CATALYST_SPLASH__`, which both native builds inject from `splashScreen.backgroundColor` (`src/native/splashConfig.js`), with the six-digit hex rule and the fallback. - Folder Structure: adds `credentials/`, `build-output/`, `.catalyst/`, `public/icon.png`, `public/splashscreen.html` and `public/offline.html`. ## MCP server (`packages/catalyst-core/mcp_v2`) - `public/icon.png` is the primary app icon on 1.2.0+. The 'App Icon File Placement' KB entry gives the real order (sized set, then `icon.png`, then placeholder) and file names. Conversion tasks T13/T14 no longer report a gap when a valid `icon.png` exists, and their definitions name the files the build actually reads (`icon-mdpi.png`, `icon-60x60-3x.png`, not `mdpi.png` / `120.png`). Apps before 1.2.0 keep the sized-set checks. - `check_config` checks `public/icon.png` the way `src/native/appIcon.js` does: a PNG, square, at least 1024px (ANDROID-010 / IOS-005), and alpha as a warning that becomes an error for an iOS release (IOS-006). It skips a platform whose sized icons replace `icon.png`, and says 1.1.x ignores the file. - `get_build_flow`: the "android/ios block missing will fail immediately" warnings now only apply before 1.2.0. The IOS-010 release warning is replaced by a note, since a Mac can sign with an installed App Store profile or the Xcode account. The signing step lists the five sources in the order `buildIos/signing.js` tries them. Android release output lists the signed APK, and debug lists `build-output/android/debug/`. Apps before 1.2.0 get the `buildApp:*` flows the 1.1.0 MCP described. - KB 'server/index.js Lifecycle Hooks': every named export in the template's `server/index.js`, and that `export default {}` hooks are ignored. - `debug_issue`: known-error entries for NATIVE-003, NATIVE-001, NATIVE-010, the one-time LAN-address rewrite, and the connected phone no longer being picked by default. - KB 'Catalyst Runtime Generations' covers 1.1.0 and 1.2.0. `check_config` names NATIVE-010 as a 1.2.0 breaking change, for `appId` and now also for an `ios.bundleIdentifier` with an underscore. - New tests in `test/app-icon.test.ts` for the icon checks, NATIVE-010 and the version-gated build flows. ## `packages/catalyst-core/context.md` Version line, appId precedence (platform keys win), `splashScreen` inside `WEBVIEW_CONFIG`, `CLIENT_ENV_VARIABLES`, the full SSR hook list with the `export default` warning, release outputs (signed APK, dSYM zip, debug APK), the iOS signing order, T12/T13/T14, and the 1.2.0 changes: NATIVE-010, the LAN rewrite, phone selection, dropped keystore passwords with the upload key reset, API 36 and 16 KB pages. ## Checks - `node docs/scripts/generate-docs-manifest.mjs && node docs/scripts/check-docs-links.mjs --strict` passes. - `npx vitest run` in `mcp_v2`: 96 passed. `npm run test:unit` passed in the pre-commit hook. - Prettier clean on the changed files. ## Before merging - Upload the film to the v1.2.1 GitHub release as `catalyst-core-1.2.1.mp4` (the 1080p share render, about 10.9 MB). Until then the page's video URL returns 404. - The release page was checked through the generator, not opened in a browser. Replaces #622, which closed when its branch was renamed. --- --- **DeputyDev generated PR summary:** --- **Size XXL:** This PR changes include 1000+ lines and should take approximately 6+ hours to review, potentially spread across multiple sessions --- This PR prepares the documentation and MCP guidance for the `catalyst-core` 1.2.0 and 1.2.1 releases. ### Main changes - **Documents the new native CLI workflow** - Adds `npm run android` and `npm run ios` for development builds. - Adds `npm run android:release` and `npm run ios:release` for signed store builds. - Documents automatic toolchain setup, emulator/simulator/device selection, debug APK generation, and native build outputs. - Describes Android AAB/APK output, iOS IPA and dSYM output, signing files, CI secrets, and upload-key backups. - **Adds the 1.2.1 release page** - Adds release metadata for versions 1.2.0 and 1.2.1. - Adds a release story and related images. - Highlights `openInBrowser`, the `X-App-Info` header, iOS edge-to-edge changes, Android API 36 support, 16 KB page alignment, splash-screen updates, security advisories, and other fixes. - **Updates project and configuration documentation** - Documents the new `credentials/`, `build-output/`, and `.catalyst/` directories. - Explains the new `public/icon.png`, HTML splash screen, and offline page conventions. - Clarifies that `splashScreen` belongs inside `WEBVIEW_CONFIG`. - Updates `CLIENT_ENV_KEYS` guidance to `CLIENT_ENV_VARIABLES`. - Documents optional Android/iOS configuration blocks in 1.2.0 and the new iOS bundle-ID validation rules. - **Clarifies SSR lifecycle hooks** - Documents the expanded hook set and their arguments. - Explains that hooks must be named exports. - Warns that hooks inside `export default { ... }` are ignored. - Documents hook error codes and whether hooks are awaited. - **Updates app-icon handling** - For `catalyst-core` 1.2.0+, `public/icon.png` can be used as a shared icon for Android and iOS. - It must be a square PNG of at least 1024×1024 pixels. - Platform-specific icon sets remain supported as overrides. - Older Catalyst versions still require the legacy density/size-specific icon files. - Adds documentation for `ANDROID-010`, `IOS-005`, and `IOS-006`. - **Improves MCP support** - Adds Catalyst version detection. - Makes build-flow guidance version-aware, distinguishing 1.2.0+ commands from older `buildApp:*` commands. - Adds config validation for icons, iOS bundle IDs, and native requirements. - Updates conversion tasks and the knowledge base with the 1.2.x behavior and migration warnings. - Adds tests covering PNG validation, icon conversion status, `NATIVE-010`, and version-specific build flows. ### Overall impact The PR makes the docs and MCP assistant accurately guide users through the 1.2.x native build and release process while retaining instructions for older Catalyst apps. It primarily documents and validates functionality introduced elsewhere in `catalyst-core`; it does not appear to implement the native build system itself. --- DeputyDev generated PR summary until 9f6a28c
Docs and MCP content for catalyst-core 1.2.0. No framework behaviour change. Each gap from the 1.2.0 audit was checked against the code before it was fixed.
Docs
docs/release-stories/1.2.1.mdx, a 1.2.1 entry at the top ofdocs/release-pages.jsonwith the release film, the posterdocs/static/img/releases/1.2.1.jpgand three card stills indocs/static/img/releases/1.2.1/, cut from the film retitled to 1.2.1. 1.2.0 gets a plain entry with its changelog section and no film, the way 1.0.2 is handled, since 1.2.1 followed four days later.export default {}inserver/index.jsare never called, and startup warns about them since 1.2.0 (src/scripts/preServerInit.js).window.__CATALYST_SPLASH__, which both native builds inject fromsplashScreen.backgroundColor(src/native/splashConfig.js), with the six-digit hex rule and the fallback.credentials/,build-output/,.catalyst/,public/icon.png,public/splashscreen.htmlandpublic/offline.html.MCP server (
packages/catalyst-core/mcp_v2)public/icon.pngis the primary app icon on 1.2.0+. The 'App Icon File Placement' KB entry gives the real order (sized set, thenicon.png, then placeholder) and file names. Conversion tasks T13/T14 no longer report a gap when a validicon.pngexists, and their definitions name the files the build actually reads (icon-mdpi.png,icon-60x60-3x.png, notmdpi.png/120.png). Apps before 1.2.0 keep the sized-set checks.check_configcheckspublic/icon.pngthe waysrc/native/appIcon.jsdoes: a PNG, square, at least 1024px (ANDROID-010 / IOS-005), and alpha as a warning that becomes an error for an iOS release (IOS-006). It skips a platform whose sized icons replaceicon.png, and says 1.1.x ignores the file.get_build_flow: the "android/ios block missing will fail immediately" warnings now only apply before 1.2.0. The IOS-010 release warning is replaced by a note, since a Mac can sign with an installed App Store profile or the Xcode account. The signing step lists the five sources in the orderbuildIos/signing.jstries them. Android release output lists the signed APK, and debug listsbuild-output/android/debug/. Apps before 1.2.0 get thebuildApp:*flows the 1.1.0 MCP described.server/index.js, and thatexport default {}hooks are ignored.debug_issue: known-error entries for NATIVE-003, NATIVE-001, NATIVE-010, the one-time LAN-address rewrite, and the connected phone no longer being picked by default.check_confignames NATIVE-010 as a 1.2.0 breaking change, forappIdand now also for anios.bundleIdentifierwith an underscore.test/app-icon.test.tsfor the icon checks, NATIVE-010 and the version-gated build flows.packages/catalyst-core/context.mdVersion line, appId precedence (platform keys win),
splashScreeninsideWEBVIEW_CONFIG,CLIENT_ENV_VARIABLES, the full SSR hook list with theexport defaultwarning, release outputs (signed APK, dSYM zip, debug APK), the iOS signing order, T12/T13/T14, and the 1.2.0 changes: NATIVE-010, the LAN rewrite, phone selection, dropped keystore passwords with the upload key reset, API 36 and 16 KB pages.Checks
node docs/scripts/generate-docs-manifest.mjs && node docs/scripts/check-docs-links.mjs --strictpasses.npx vitest runinmcp_v2: 96 passed.npm run test:unitpassed in the pre-commit hook.Before merging
catalyst-core-1.2.1.mp4(the 1080p share render, about 10.9 MB). Until then the page's video URL returns 404.