Releases mode: browse, create, edit, delete GitHub releases from ghui#1
Merged
Releases mode: browse, create, edit, delete GitHub releases from ghui#1
Conversation
Phase 1 of plans/create-releases.md. Adds Release/ReleaseSummary/Tag/Branch/ DiscussionCategory/MakeLatest types, plus listReleases, getRelease, getLatestRelease, listTags, listBranches, getDefaultBranch, generateReleaseNotes, listDiscussionCategories, createRelease, updateRelease, deleteRelease on GitHubService and the mock layer. No UI yet.
Phase 2 of plans/create-releases.md. Adds a 'Releases…' command that opens a full-screen modal showing the active repository's releases (tag, name, draft/pre-release/latest badges, published date, author) with pagination, plus an inline details view with the release body and assets. Supports 'o' (open in browser), 'y' (copy URL), 'r' (refresh), ']' (load more). Read-only; create/edit/delete come in phase 3. Persistent caching deferred from the plan — releases refetch on each open and live in the modal state. Will revisit when the form lands and we need to bust caches on local mutations.
Phase 3 of plans/create-releases.md. Adds a 'New release…' command and an 'e'/'n' keybind on the releases overlay that open a form modal mirroring github.com's create-release page. Fields: tag, target (defaults to the repo's default branch, fetched lazily), title, multi-line description (reusing the comment editor), pre-release checkbox, make_latest tri-state. Submission: - ctrl-g generates release notes (only fills empty title/body, matching web) - ctrl-s saves as draft - ctrl-↵ (or shift-↵ outside the body) publishes - esc cancels back to the releases overlay (or closes if opened directly) The same form handles edits when invoked from the releases list — body is hydrated from the full release fetch so the tag/title/etc. are usable immediately while the body loads in. Tag autocomplete dropdown, target picker, previous-tag picker, and discussion category support are still deferred to phase 4 along with the delete-with-confirm flow.
The command palette filters out disabled commands entirely (commandEnabled check in App.tsx), so gating release.list / release.new on selectedRepository made them vanish instead of showing as greyed. Drop the disabledReason — the action handlers already flashNotice 'Open a repository first.' when invoked without a repo.
opentui's <text> rejects nested <text> children with 'TextNodeRenderable only accepts strings, TextNodeRenderable instances, or StyledText instances'. ReleaseForm's MakeLatestRow and ReleasesModal's release- details badges row both wrapped a TokenLine inside a TextLine, which is a <text> in <text>. Inline the spans directly instead.
Phase 4 (final) of plans/create-releases.md. Adds a 'shift-d' keybind on the releases overlay (and details panel) that opens a confirmation modal for deleting a release; deletion is optimistic on the in-memory list state and bounces back to the releases overlay. Documents the full Releases workflow in the README. The plan is closed out with explicit follow-ups for the remaining nice-to-haves (tag autocomplete dropdown, discussion categories, target branch picker, persistent cache, asset upload). The v1 loop — browse, create, edit, publish/draft, delete — is complete.
Opening 'New release' now seeds the tag field with the repo's latest release tag and shows 'previous: vX.Y.Z' in the form subtitle. Bumping versions is a backspace + edit instead of remembering the last tag. If the releases overlay is already open we reuse its cached latest tag so the prefill is instant; otherwise we kick off getLatestRelease in the background and fill the field if the user hasn't typed yet (mirrors the 'only fill empty fields' rule we already use for generate-notes).
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.
Implements
plans/create-releases.md— a Releases overlay reachable from the command palette that gives 1:1 parity with github.com's "Create a new release" page for the active repository, plus a list/details browser for existing releases.What you can do
enteron a release → full body wrapped to width, asset list, scrollable.non the overlay → form with tag, target (lazy default-branch fetch), title, multi-line body, pre-release toggle, latest tri-state.ctrl-ggenerates notes (only fills empty title/body),ctrl-ssaves draft,ctrl-↵publishes. The tag field is prefilled with the previous tag so bumping a version is one backspace + edit.eon a selected release → same form, prefilled.shift-d→ confirmation modal that calls out tag preservation; optimistic removal on success.Shape of the change
Release/ReleaseSummary/Tag/Branch/DiscussionCategory/MakeLatesttypes, plus 12 typedGitHubServicemethods (listReleases,getRelease,getLatestRelease,listTags,listBranches,getDefaultBranch,generateReleaseNotes,listDiscussionCategories,createRelease,updateRelease,deleteRelease) backed bygh apiandgh api graphql. Mock layer mirrors all of them.ReleasesModal,ReleaseForm,DeleteReleaseModal) and three new keymap layers wired throughappKeymap. DiscriminatedModalenum extended withReleases/ReleaseForm/DeleteRelease.textInputActiveso quit-on-qis suppressed while editing the form.gh apiflag plumbing.Decisions baked in (from the plan)
Deferred to follow-ups (documented in the plan)
Tag autocomplete dropdown, target branch picker, previous-tag picker, discussion category UI (service method already wired), persistent SQLite cache, asset upload, markdown preview pane.
Commits
02df24fGitHubServicemethods + mock, 8 unit tests9e52db899a091e4905b7835e33a6TokenLineinsideTextLine(opentui rejects nested<text>)83d02b5shift-ddelete-with-confirm, README sectione94b06fChecks
bun run format:check,bun run typecheck,bun run lint,bun run test(324 pass) all green on every commit.Changesets queued: 5 (4× minor, 1× patch). Ready for
bun run changeset:version.