Repository navigation
feat(github): resolve accounts by repository access - #557
Merged
nixuuu merged 9 commits intoNov 12, 2026
Merged
Conversation
nixuuu
force-pushed
the
feat/github-repository-accounts
branch
from
November 12, 2026 08:36
ce85023 to
2a9d085
Compare
nixuuu
force-pushed
the
feat/github-repository-accounts
branch
2 times, most recently
from
November 12, 2026 12:25
c0ae5ba to
2aedf51
Compare
Keep long repository, account and base branch names within the dialog at phone widths.
nixuuu
force-pushed
the
feat/github-repository-accounts
branch
from
November 12, 2026 12:44
4cef5d1 to
d9fad4f
Compare
nixuuu
marked this pull request as ready for review
November 12, 2026 12:45
nixuuu
added a commit
that referenced
this pull request
Nov 12, 2026
## Behavior “Link pull request” opens a compact repository picker on web/desktop and a sheet on mobile. Open PRs are ordered by last update, with matching head branches first and the resolved user's PRs next. Rows include state icons, number, title, branches, login, updated time and linked status. Selecting a row links immediately and keeps the picker open for additional links. Search matches numbers, titles, branches and authors. Numeric input and PR URLs retain manual linking, including another repository by URL. Open/All, incremental scroll paging and immediate skeletons use shared controls. Sparse searches scan at most three cached upstream pages per request and offer **Load more** to continue. The additive owner-scoped RPC resolves the repository from the thread workspace. It uses the existing GitHub client, account budgets, short cache, single-flight and REST ETags/304. Signed cursors bind owner, thread, repository, account/access revisions and filters. Tokens remain in the gateway. Missing account, repository access, rate limits and non-GitHub remotes have separate states and actions. The empty panel contains **No pull requests yet** and its two actions, without the account/manual-link explanation. Layer #557 provides automatic repository-access account resolution and fixes Create PR. Ship both layers together into `dev` with `gh stack`. ## Verification - Rebased with `gh stack rebase` onto `d3c7e0191`. Migrations 0124–0126 remain from dev; repository access stays 0127. Generated contract conflicts were regenerated with `bun run gen`. - `bun install` and `bun run gen:check` passed. Focused gateway/database suite: 67 tests passed, 412 assertions. After the final rebase, 42 focused tests passed again, 237 assertions, covering picker, account resolution and migration stages. Coverage includes listing/pinning, paging, number/title/branch/author search, ETag/304, each error, index refresh, ownership, creation, revocation and discovery. No real GitHub API requests, web UI test suites or full local `check:tmp` were run. - Real browser review used a disposable gateway, worker and loopback GitHub fixtures. Verified branch/user priority, draft/open/merged/closed icons, search, Open/All, scroll paging, immediate linking, linked-row disabling, multi-link and URL entry. Row DOM identities stayed unchanged on hover. - Reviewed light/dark at desktop 1280×800 and phone 390×844, including long titles, branches and logins. Verified empty repo, missing account/Connect GitHub, no access/Manage access, rate-limit reset, unavailable service/retry and non-GitHub URL fallback. One account has no switcher; several show an optional switcher and preserve its selection after reopening. The empty panel has no hint paragraph. - EAS CLI 27.4.1 production fingerprints match dev exactly: iOS `6ddec9ef559ee0095ac33e94ff9418a942053b17`; Android `5f6eae3ab278f1cd543e9ed763f923a319b65ec9`. Mobile changes are JavaScript only. The final rebase did not change native inputs. Browser and fixture processes were stopped by PID. Final remote CI state is reported in the handoff. ## Copy audit — docs/copy.md §8 - URL-only linking → **Find a pull request**, **Open / All**, **Link by URL**, **Load more**. Labels use sentence case and concrete actions. - “Choose a repository account or link a pull request manually to match this branch.” → removed. The empty panel contains **No pull requests yet**, **Link pull request** and **Create pull request**. - **Current branch**, **Yours** and **Linked** identify priority/availability. State icons have accessible labels; metadata does not rely on color alone. - Distinct account/access/request-limit/connection errors offer **Connect GitHub**, **Manage access**, **Retry** or the reset time. No token/protocol details, humor or new glossary terms appear. - Short, typical and long rendered text, truncation, reserved badge space, themes and widths were reviewed in the real browser. Account controls appear only for several accessible accounts.
nixuuu
added a commit
that referenced
this pull request
Nov 12, 2026
The same thread now exposes its home connector access and scheduled tasks from either linked computer. A dedicated display DTO omits credentials, headers, endpoints and account errors. Connector grants, schedule creation, edits and cancellation run at home with owner and revision checks. Worker grants affect every thread on that worker; inherited All workers and account administration show a compact home-management hint. Verified panel responses survive a restart and remain visible as stale when the home or panel read is unavailable. The archived sidebar now pages local rows together with committed linked metadata: the previous 7 vs 31 counts came from intentionally local-only archive reads. The three-gateway move regression now reconnects with a saved thread cursor and requires a removal from the old home. The runtime exemption for mirror subscriptions and range acknowledgments is already present in the rebased dev branch; individual thread operations still follow their redirects, and ACKs retain peer/subscription/cursor validation. Gateway-to-gateway regression coverage exercises safe metadata, schedule create/list/edit/cancel, home enforcement after grant changes, owner isolation, cached stale reads, restart/unlink and archive totals/pagination. Mobile changes are JavaScript/TypeScript only; native configuration and dependencies are unchanged. Validation: - `bun install`, `bun run gen:check`, package-db typecheck and changed-file oxfmt/oxlint passed. No full local `check:tmp` was run, as requested; CI runs the full checks and test shards. - Focused gateway-to-gateway panel tests, schema and upgrade tests passed. The three-gateway move regression passed 20 consecutive runs. After rebasing onto migration 0126, the panel/schema/inherited-access tests passed; the staged sync upgrade exposed an ordering assumption, was repaired and passed its focused rerun (17 assertions). - Real-browser review used two linked gateways in light/dark at desktop and phone widths. Both views show Connectors and Scheduled tasks. Remote grant revoke/restore was reflected at home; remote schedule create/edit/cancel worked. Disconnecting home retained connectors and schedules with explicit stale/unreachable text and disabled actions. Both archive counts were 38 (7 + 31), including offline. Short, typical and long labels remained readable without horizontal overflow; removed a duplicate offline hint that compressed schedule rows on phones. - Native fingerprints match the tested dev base (`a79d316c`) for both platforms: iOS `6ddec9ef559ee0095ac33e94ff9418a942053b17`; Android `5f6eae3ab278f1cd543e9ed763f923a319b65ec9`. Mobile changes remain JS/TS only. Subsequent rebases include JS/TS-only mobile changes from dev; fresh CI runs on the final head. Copy audit (§8): hidden sections → visible Connectors and Scheduled tasks; Manage → scoped connector-access dialog with “Changes apply to every thread on this worker.” This states the grant's actual scope. Stale metadata → explicit last-known-details status; account-wide changes → “Manage accounts on <computer>”. New actions use verbs, sentence case and text status cues; no humorous copy. Existing controls provide keyboard/focus behavior and name truncation. Browser review covered short, typical and long names in light/dark at desktop and phone widths, including offline states and dialog scrolling. Related: #543, #539 Migration coordination: rebased onto `580a4815`, including #562 = 0124, #547 = 0125, #560 = 0126 and #557 = 0127. This PR registers `0128_thread_panel_cache`; the loader and schema expectations list 0124 through 0128 in order. The staged thread-sync upgrade test reads the migration tail dynamically after the explicit 0126 stage, including 0127 and 0128, checks that durable sync state survives, and verifies that repeating the full migration is a no-op. It does not assume 0128 is the latest migration. Focused schema and staged/inherited-access upgrade tests passed again after this rebase (25 tests, 107 assertions); all 6 remote-panel integration tests also passed (63 assertions). `bun install` and `gen:check` passed. An initial panel test launch resolved a workspace package to another checkout; refreshing installation corrected the local alias before the successful rerun.
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.
Behavior
GitHub accounts resolve in the gateway from the owner's repository access. A single matching account, including an organization installation, works immediately. Several matches retain the last account used for that repository; otherwise a human account wins over a bot/App, followed by stable login/ID ordering. Optional inline account controls appear only with several accessible accounts.
The resolver serves the Link PR picker, manual URL linking, Create PR, PR reads, branch detection and authenticated release lookups. The repository/installation index is cached for 15 minutes and refreshed by the periodic sweep or an explicit installation re-list. Catalogue changes atomically replace the index, bump access revisions, invalidate private caches and update projections; unchanged re-lists preserve revisions and ETags. Migration 0127 adds the index, account type and catalogue fingerprint. Explicit PAT choices remain supported; connector tokens are never probed automatically. Credentials stay in the gateway.
Create PR starts with
owner/repoand head → base, without an empty account separator. Base defaults to the saved thread base when valid, otherwise the repository default, and remains editable. Draft/review controls enable when required fields are present. Distinct messages describe unpublished branches and unpushed commits. No existing push action is exposed by the API, so the copy directs users to git/their agent and refresh. Header controls now truncate long names within the phone dialog. Web/desktop and mobile share the behavior; mobile changes are JavaScript only.Second layer above #553; ship the complete stack together into
devwithgh stack.Verification
gh stack rebaseontod3c7e0191, retaining dev migrations 0124–0126 and this migration at 0127. Regenerated the additive contracts.bun installandbun run gen:checkpassed.check:tmpor real GitHub API calls were run. Remote CI supplies full static/build/test coverage; final status is in the handoff.dev, supports editing base, enables Draft with agent and Review after entering a title, and precisely reports unpublished/unpushed branches. No model invocation or real GitHub mutation was made.6ddec9ef559ee0095ac33e94ff9418a942053b17, Android5f6eae3ab278f1cd543e9ed763f923a319b65ec9. Native inputs are unchanged. Browser and fixture processes were stopped by PID.Copy audit — docs/copy.md §8
owner/repo, head → base. Base branch names the editable control; Base unavailable identifies the field when access is missing.