Default the Plan issue dialog to Forgejo issue, with an open-issue picker #247
No reviewers
Labels
No labels
Agent
Ignore
Agent
In Progress
Agent
Planned
Agent
Planning
Agent
Ready
Agent
Triage
Compat
Breaking
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lucas/omp-deck!247
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/issue-246-plan-issue-picker"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes: #246
The Plan issue dialog now opens on "Forgejo issue" (the leading radio) with
the caret already in the issue field, and that field became a combobox over the
repository's open issues.
What changed
ForgejoIssueSummary/ListForgejoIssuesResponse.DispatchApi.searchOpenIssues— open issues ofowner/repo, newest-updatedfirst, pull requests excluded.
type=issuesalready excludes PRs server-side;the local
pull_request == nullfilter keeps the contract true regardless.Ordering is done locally rather than through an unverified
sortparameter.GET /api/forgejo/issues—workspaceId(+ optionalq), resolvingworkspace → config → repository with the same sequence and the same two 422
messages as
/forgejo/plan-issue, so a workspace that cannot plan an issuecannot list issues either. A client failure maps to 502.
apps/web/src/lib/issue-suggest.ts— local matcher, mirroringinbox-suggest.ts(that one is typed onInboxItemand scores overtitle/body/id, so it cannot be reused). All-digit queries match on the number,
prefix matches first.
PlanIssueModal— the issue input and the inbox input now share onecombobox implementation (
query,activeIndex,AnchoredPortal, keyhandling). The dialog prefetches the open issues on open; a prose query hits
the instance after a 140 ms debounce; a number never costs a request, because
Forgejo's
q=searches prose and a number is already a valid seed. Switchingsources clears the shared field.
Degradation
Typing a number works independently of the list. When the prefetch or a search
fails, the dialog shows
Could not load issues: … — type an issue number to plan itin muted text, not the red error box: it is a degraded list, not a failedaction. A number with no match in the loaded list renders nothing — submit
already answers with
#N is closed,#N is a pull request, not an issueorissue #N not found.Verification
bun run typecheck— clean across all workspaces.bun test— 1608 pass / 0 fail.bun run buildinapps/web— clean.apps/web/src/lib/issue-suggest.test.ts(empty query → 10 newest, numberquery narrows by number with prefix first and ignores titles, multi-word
ranking, no match →
[]) anddescribe("GET /forgejo/issues")inapps/server/src/routes-forgejo.test.ts(400 / 404 / 422, the happy path withthe
qargument asserted asnulland as the trimmed string, and 502 on aclient failure). The route tests seed a config row and give the workspace a
real git
originon the configured instance, the wayforgejo/workspace-index.test.tsdoes.a live instance (no browser in this session). The combobox plumbing is the
existing inbox one, and the route/matcher sides are covered by the tests above.