Skip to content

feat(web): repo selector on draft creation with default repo#122

Merged
neonwatty merged 4 commits intomainfrom
feat/draft-creation-rework
Apr 18, 2026
Merged

feat(web): repo selector on draft creation with default repo#122
neonwatty merged 4 commits intomainfrom
feat/draft-creation-rework

Conversation

@neonwatty
Copy link
Copy Markdown
Collaborator

Summary

Test plan

  • pnpm turbo typecheck passes
  • pnpm turbo test — 398 tests pass
  • No repo selected → saves as local draft (existing behavior preserved)
  • Repo selected → creates draft + assigns → navigates to new issue
  • Default repo auto-selects on re-open
  • Server action input validation on setDefaultRepoIdAction

@neonwatty neonwatty enabled auto-merge April 18, 2026 21:11
Rework CreateDraftSheet to address three issues:

- #101: Compact mobile layout — reduce padding, font size, and margins
  on small viewports so the sheet doesn't fight the keyboard
- #91: Add optional repo selector dropdown — when a repo is selected
  the draft is created and immediately assigned (creating a GitHub
  issue); when "none" is selected it saves as a local draft
- #111: Persist a default_repo_id setting so the repo selector
  pre-selects the user's preferred repo on each open; automatically
  saves the last-used choice as the new default
…reset

- Add input validation to setDefaultRepoIdAction (matches existing
  pattern for server boundary validation)
- On assign failure after draft creation, navigate to the draft
  instead of leaving an invisible orphan
- Reset selectedRepoId at start of useEffect to prevent stale state
  during re-open
Every catch block that previously swallowed errors now logs via
console.error/warn. Fixes: listReposAction (zero error handling),
getDefaultRepoIdAction (bare catch), useEffect repo load, fire-and-
forget setDefaultRepoIdAction, and handleSave outer catch.
@neonwatty neonwatty force-pushed the feat/draft-creation-rework branch from 5b67bf4 to dc995f6 Compare April 18, 2026 21:31
@neonwatty neonwatty added this pull request to the merge queue Apr 18, 2026
Merged via the queue into main with commit 9eb388b Apr 18, 2026
3 checks passed
@neonwatty neonwatty deleted the feat/draft-creation-rework branch April 18, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment