Remove dead GitHub create residue from Launch UI - #159
Conversation
Push to GitHub was removed in #61 and the Forge API no longer exposes create-on-GitHub OAuth endpoints (apache/grails-core#15812). Delete leftover helpers, OAuth callback routing, clone NextSteps, and the createRepo tooltip so the UI matches the server. Keep footer/marketing GitHub org links. Assisted-by: Sisyphus:xai/grok-4.5
|
Cleaning this up once and for all on both ends. Frontend (this PR): remove leftover Launch UI residue for create-on-GitHub after the button was already dropped in #61 (github href helpers, OAuth callback routing, clone NextSteps, Backend companion: apache/grails-core#15812 removes the unused Forge API GitHub create / OAuth / push stack, config, JGit dependency, and deploy secrets. Together these finish the removal so neither side keeps a half-dead create-on-GitHub path. |
There was a problem hiding this comment.
Pull request overview
This PR removes remaining “GitHub create / OAuth callback / clone-to-repo” residue from the Launch UI so it matches the post-#15812 Forge API behavior, and simplifies the post-generate “Next steps” flow to zip-only.
Changes:
- Removes GitHub share/link helpers and SDK URL builders tied to the former GitHub create flow.
- Drops GitHub OAuth callback route handling and related state/query plumbing.
- Simplifies
NextStepsto a zip-only flow and adds a unit test for unzip instructions.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| app/launch/src/state/store.js | Removes GitHub link/share helpers from the zustand store. |
| app/launch/src/state/factories/initializeState.js | Stops extracting GitHub clone/callback query params into initial state. |
| app/launch/src/micronaut/MicronautStarterSDK.jsx | Removes GitHub HREF helper APIs from the SDK wrapper. |
| app/launch/src/micronaut/creators/ToUrl.js | Updates prefix validation message to remove github from supported prefixes. |
| app/launch/src/constants/messages.json | Removes the unused createRepo tooltip string. |
| app/launch/src/components/NextSteps/NextSteps.jsx | Removes GitHub repo/clone UI and makes NextSteps zip-focused. |
| app/launch/src/components/NextSteps/tests/NextSteps.test.jsx | Adds unit test coverage for zip “unpack” instructions. |
| app/launch/src/components/GenerateButtons/GenerateButtons.jsx | Removes the unused clone-related prop from the component signature. |
| app/launch/src/components/Application/useOnMountRouting.js | Removes the GitHub repo-cloned callback hook; keeps share/deeplink routing. |
| app/launch/src/components/Application/App.jsx | Removes clone and repo-created wiring; NextSteps is now triggered only by zip create. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const unpackCommand = useMemo(() => { | ||
| switch (info.type.toLowerCase()) { | ||
| case 'clone': { | ||
| const all = `git clone ${cloneUrl}` | ||
| const cmd = { [OS_NIX]: all, [OS_WINDOWS]: all } | ||
| return { action: 'Clone the repo', cmd } | ||
| } | ||
| case 'zip': { | ||
| const nix = `unzip ${name}.zip` | ||
| const unzip = { [OS_NIX]: nix } | ||
| return { action: 'Unzip the archive', cmd: unzip } | ||
| } | ||
| default: | ||
| return null | ||
| } | ||
| }, [info.type, cloneUrl, name]) | ||
| const nix = `unzip ${name}.zip` | ||
| return { action: 'Unzip the archive', cmd: { [OS_NIX]: nix } } | ||
| }, [name]) |
| expect(screen.getByText('Unzip the archive')).toBeTruthy() | ||
| fireEvent.click(screen.getByRole('button', { name: 'Unix/Linux/macOS' })) | ||
| expect(screen.getByText('unzip sample-app.zip')).toBeTruthy() | ||
| }) |
Summary
Follow-up to apache/grails-core#15812, which removed the Forge server-side GitHub create/OAuth stack.
The Launch UI already dropped the Push to GitHub button in #61, but leftover dead code remained (GitHub href helpers, OAuth callback route handling, clone NextSteps,
createRepotooltip). This PR removes that residue so the UI matches the API.Changes
getGitHubLink/useGitHubShareLinkand SDKgithubHref*helpersuseHandleRepoClonedRouteEvent)onCloneProject/cloneProjectwiringNextStepsto zip-only post-generate flowcreateRepotooltip messageNextStepsunit test for zip unpack instructionsIntentionally kept
GitHubLink,AltFooter)Test plan
npm test(31 tests)npm run lint