feat(web): repo selector on draft creation with default repo#122
Merged
feat(web): repo selector on draft creation with default repo#122
Conversation
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.
5b67bf4 to
dc995f6
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.
Summary
default_repo_idsetting — auto-selects last-used repo on next create, persisted across sessions (closes Allow registry assignment on draft issue creation with a default to users' either drafts for local or their own private draft issue repo. That can be public or private. #111)Test plan
pnpm turbo typecheckpassespnpm turbo test— 398 tests passsetDefaultRepoIdAction