Repository navigation
Turn a new commit into a /feature or /bug issue, as the web does - #22
Merged
Merged
Conversation
Typing /feature or /bug and a space at the start of the compose sheet turns the draft into an issue, with the web's badge, placeholders and Open issue. A slash offers the web's command menu, and a draft that mentions a bug or a feature gets the web's hint. Opening it sends POST /api/v1/issues (nunomaduro/dev-null.sh#653) in the background, then the sheet says "Opened issue #123." with View issue, as the web's toast does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
simonhamp
force-pushed
the
feat/issue-commands
branch
from
October 19, 2026 23:57
c728e50 to
e9adceb
Compare
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.
Brings the web's
/featureand/bugcommands to the compose sheet. On the web they turn a new commit's draft into a public issue on nunomaduro/dev-null.sh, opened by devnull's GitHub App and crediting you. Quotes and replies don't have them on the web, so they don't here either.The API side is nunomaduro/dev-null.sh#653 (
POST /api/v1/issues). Until that's on production, opening an issue fails, but nothing else changes.What it does
/featureor/bugand a space at the start of a new commit turns it into an issue, without the command. A badge with the command and an X goes over the field, with "Public issue on nunomaduro/dev-null.sh, crediting you" beside it. The field takes the web's Markdown template as its placeholder (# Bug title,## Stepsand so on; devnull takes a first# headingas the title) and Open issue takes Commit's place. The X turns it back into a commit, keeping what you wrote.The matching rules (what counts as a typed command, which drafts get the menu or the hint) are ported from the web's
issue-commands.ts, andIssueCommandTestruns the web's own test cases against them.The menu without focus events
The web opens its command menu only while the composer has focus (#528 upstream), so a lone slash restored from the stash doesn't pop it open. EDGE doesn't tell PHP when a field gains or loses focus, so here the menu waits until you've typed in the sheet since it opened. The field is focused as soon as the sheet opens and it's the only place in the sheet to type, so in practice that's the same rule: a restored slash opens the menu at your next keystroke, not on its own.
Worth checking
DraftsIssues::canDraftIssue()is where that check goes when they arrive.environmentfield, but the app doesn't send device details yet, so its badge still just says "crediting you".Screenshots
From an iOS simulator against #653's branch, through a Cloudflare tunnel, with GitHub stubbed so no real issues were filed.
Screenshots live on the
issue-commands-screenshotsbranch. Delete it after merge.Testing
Rebased onto main after Remotes (#25), the image cache (#27) and the dashed borders (#21). 951 tests pass and Pint is clean. New tests cover typing each command, the menu and when it opens, the hint and dismissing it, going back to a commit, quotes staying commits, the length limits, opening an issue with the spinner and the receipt, View issue, a swiped-away sheet, and each kind of failure.
On the simulator I checked the menu, typing
/bug, picking/featurefrom the menu, the hint's Use /bug on a restored draft, opening both kinds of issue, View issue in the in-app browser, and GitHub refusing one. After the rebase it's also on Simon's iPhone, against the same API with the Remotes API merged in.Closes the idea board's to-do #312.
🤖 Generated with Claude Code