Skip to content

Remove dead GitHub create residue from Launch UI - #159

Open
jamesfredley wants to merge 1 commit into
mainfrom
chore/remove-dead-github-create-residue
Open

Remove dead GitHub create residue from Launch UI#159
jamesfredley wants to merge 1 commit into
mainfrom
chore/remove-dead-github-create-residue

Conversation

@jamesfredley

Copy link
Copy Markdown
Contributor

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, createRepo tooltip). This PR removes that residue so the UI matches the API.

Changes

  • Remove getGitHubLink / useGitHubShareLink and SDK githubHref* helpers
  • Remove GitHub OAuth callback route handling (useHandleRepoClonedRouteEvent)
  • Remove dead onCloneProject / cloneProject wiring
  • Simplify NextSteps to zip-only post-generate flow
  • Drop unused createRepo tooltip message
  • Add NextSteps unit test for zip unpack instructions

Intentionally kept

  • Footer / marketing links to GitHub org repos (GitHubLink, AltFooter)
  • Share deep-links for preview / diff / create (zip)

Test plan

  • npm test (31 tests)
  • npm run lint

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
Copilot AI review requested due to automatic review settings July 29, 2026 22:47
@jamesfredley

Copy link
Copy Markdown
Contributor Author

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, createRepo tooltip).

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.

Copilot AI left a comment

Copy link
Copy Markdown

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 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 NextSteps to 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.

Comment on lines 29 to +32
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])
Comment on lines +20 to +23
expect(screen.getByText('Unzip the archive')).toBeTruthy()
fireEvent.click(screen.getByRole('button', { name: 'Unix/Linux/macOS' }))
expect(screen.getByText('unzip sample-app.zip')).toBeTruthy()
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants