* fix(github): stop PR pages from hanging when the rate-limit cache expires
Slot holders await assertRateLimitBudget -> getRateLimit while holding a
gh semaphore slot, and the /rate_limit probe queued for a slot behind
them. With all four slots held by budget waiters nothing ever released.
The probe is quota-exempt and deduped, so it no longer takes a slot.
* fix(github): bound rate-limit probe concurrency without the gh semaphore
Forced getRateLimit calls now join an in-flight probe, and all /rate_limit
probes share a small probe-only limiter that acquires nothing else.
Fold the deadlock regression test into rate-limit.test.ts as a direct await.
* fix(github): make forced rate-limit probes read quota after the call
Forced callers (403 reset refinement) share one follow-up probe queued
behind the running one instead of joining a probe that may predate the
403, so a stale positive budget cannot clear a fresh breaker block.
* fix(github): hand forced rate-limit follow-ups off synchronously
A pending forced follow-up could outlive its probe's settlement, so a
later forced caller joined a probe that predated it. Settlement now
detaches the shared deferred follow-up and starts its probe in one
synchronous step. Run rate-limit.test.ts on the Node runtime, where the
V8 scheduling that opens the race is reproducible.
* refactor: import journal queue state from defining owners
* refactor(shared): organize execution and automation owners
* fix: retain type imports used by surviving test cases
* refactor: finish work item owners and refresh validation metadata
* test: infer reconnect status fixture type
* test(claude): resolve source files beside same-named directories
* test(runtime): group repository creation mock registrations
* chore(lint): bump oxlint to 1.91, add perf lint rules and perf audits
* fix(lint): await promises returned inside try/catch/finally for return-await
Prepare typescript/return-await with error-handling-correctness-only: await
returns whose catch or finally was meant to cover them, and suppress the eight
sites where the catch must not re-handle the returned promise.
* chore(lint): enable return-await (error-handling-correctness-only); exempt secondary-scan directives in the changed gate
* refactor(mobile): move file preview discard modal into its own module
Keeps MobileFilePreviewScreen under the 400-line limit after merging main.
---------
Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
RpcDispatcher now requires its method list, so these suites can no longer consume
the default manifest. Suites that still reach the registry through the RPC server
keep the guard.
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
Shows CI result lines in the chat that opened or pushed to a pull request. They're hidden in the terminal overlay and on the phone until the phone app gets the setting.
* fix(tasks): confirm a lost Tasks comment by author on GitLab and GitHub REST reads
Only GitHub GraphQL's viewerDidAuthor marked the viewer's comments, so on GitLab,
the GitHub REST fallbacks (including issues with more than 100 comments) and the
gh view fallbacks the phone kept an unconfirmed draft even after the comment
posted. Those reads now match the login of the account that made them, and an
explicit PR refresh reads comments uncached.
* fix(mobile): settle an unconfirmed comment only on one posted after the send
A refresh of an issue with more than 100 comments reads comments the first
load never showed, so an older identical comment by the same account looked
new and could clear the draft.
* refactor(gitlab): share the glab viewer read and skip it on Checks polling
* test(mobile): pin the clock in the unconfirmed comment test
An unconfirmed send settled as posted when the refreshed thread had any new
comment with the same text, so another person's identical comment cleared the
draft. The host now passes GitHub's viewerDidAuthor, and the phone settles only
on a comment the viewer wrote. Without it (GitLab, REST fallbacks, older hosts)
the draft stays with the check-the-thread notice.
* Upload GitHub images when pasted or dropped
Keep image bytes out of issue and review bodies by uploading from the owning composer and inserting hosted attachment URLs.
Co-authored-by: lydiassssz <60514233+lydiassssz@users.noreply.github.com>
* Preserve GitHub image intake across editor and thread states
* Keep image placeholder boundaries and ordinary HTML paste intact
* Match the native replace overload in the image projection fixture
* Use typed element queries in the image intake fixture
* Narrow textarea elements at the fixture boundary
* Show failed GitHub draft images as filename links
* Keep GitHub draft attachment links current across updates
* Supply the repository address in the attachment preview fixture
---------
Co-authored-by: lydiassssz <60514233+lydiassssz@users.noreply.github.com>
* feat(native-chat): show details on link cards for any repo on a known host
A chat link card for a pull request or issue in a repository other than the
workspace's own showed only its name, because the lookup answered only for the
workspace's configured remotes. Previews now read any repository on a host those
remotes use, with that host's sign-in, as the common pattern does. Other lookups
keep the exact-repository check, and an unknown host still gets no credentials.
* fix(native-chat): open link cards for other repos on the chat repo's host
The hover card still admitted only the chat repo's own links, so the wider
lookup was never reached. Links to any repo on a host the chat repo uses now
open the GitHub card. When an older host or a repo the sign-in can't read
leaves it unanswered, the card falls back to the web preview, or just the
link's name, as such a link showed before, instead of a failure.
* fix(native-chat): keep another repo's web preview until its details arrive
A link card for another repo showed the GitHub skeleton first and only fell back
once the lookup failed, so older hosts got two loading stages and a change of
shape. It now shows the web preview it always showed until the details arrive,
and keeps it when none do.
* fix(native-chat): show just the name for another repo's link while its details load
With web previews off, a link card for another repo showed the GitHub skeleton
and collapsed to the name when no details came. It now shows the name from the
start, so nothing collapses when an older host or an unreadable repo answers
with nothing.
* feat(checks): show when each check ran and how long it took
Check rows in the right-sidebar Checks panel now show how long a
finished check took and how long ago it finished (or started, while it
runs), with exact start and finish times on hover. GitHub check runs,
legacy commit statuses and GitLab jobs carry provider run times; rows
without times show nothing.
A GitLab pipeline that ran on a commit the merge request has since moved
past says so. The GitHub rollup read keys its 60s cache by the expected
head, so a push never serves the previous head's checks.
* test(checks): bound the clock work of check time labels
* perf(checks): rebuild check time text only when its data changes
Clock ticks now move only each row's age; exact times, duration and copy
are built once per data or language change. Move the run-time mapping
tests to the mapping layer to keep the client test file within budget.
* fix(checks): annotate the gh pr checks reply instead of casting it
* fix(checks): say when a running check started; key the rollup cache by a query comment
A running row reads 'started 5m ago' so its age isn't read as when it
ran. The expected head now rides in a GraphQL comment, which servers
ignore but gh's cache key includes. Add the new copy to the English
catalog and test behavior rather than formatted copy.
* fix(checks): let check times truncate before names in a narrow sidebar
At the narrowest sidebar the time text never shrank, squeezing check
names to nothing and pushing status labels out of their rows. The time
now sits beside the name, gives up width first, and the name keeps a
minimum width.
* fix(checks): rebuild check time copy when translation catalogs change
* fix(checks): reserve room for a running check's growing start age
* test(checks): keep REST check-run times covered through the schema
* fix(checks): read the checks rollup without gh's disk cache
gh's cache key ignores the PR head, so after a push it answered with the
previous head's checks, and it never evicts expired entries. Orca's own
head-keyed checks cache and read coalescing already bound the requests.
* fix(checks): hide check times in rows too narrow to show them
Below a 17rem row the time text is hidden, so the narrowest sidebar keeps
main's name, status and link layout; wider rows truncate the time before
the name, which keeps a 36px minimum.
* fix(checks): truncate a check's duration before its age
The age answers when a check ran, so in a tight row the duration now
gives up its width first.
* test(checks): type the rollup fixture
* fix(checks): show check times only in rows with room for them
Between a 17rem and 19rem row the times squeezed names to their minimum
and clipped; hold them back until 19rem, which the default 350px sidebar
clears.
* fix(checks): keep a minimum name width only while check times show
Rows too narrow for times, including the narrower folder-workspace parent
PR rows, now lay out exactly as before.
* fix(checks): show a running check's elapsed time instead of its start age
'started 10m ago' reserved so much room that running check names shrank
to a few characters at the default sidebar width; beside a running status
the elapsed time ('10m') says the same thing in a quarter of the space.
* test(checks): use a type import for the mocked module
Forge detection asks GitLab, GitHub, GitHub Enterprise, Bitbucket, Azure
DevOps and Gitea in turn, and each probe ran its own git remote get-url.
Share one read per remote across a single detection pass; the scope
closes when detection returns, so later reads see current config.
Co-authored-by: m4air <m4air@Mac.localdomain>
Show cancelled PR checks as Cancelled with separate counts on desktop and mobile, preserving genuine failures, pending checks, existing action permissions and older-client fallback. Carry complete provider summaries through caches and presentation; preserve Azure source completeness, folder attention priority and muted cancellation details.
Tracked in #15847 and STA-5102.
* Keep opened GitHub work items bound to their exact repository
* Bind GitHub work item ownership through consumers and dispatch
* Keep empty mention lists from consuming selection keys
* Preserve GitHub action and consumer ownership across resource changes
* Exercise repository account updates through their production store action
* Exercise account publication and cache settlement through GitHub consumers
* Simplify fork PR contract verification
* Make contract verification imports and clocks deterministic
* Correct mobile task test fixtures and model types
* Correct task recording fixtures and CI types
* Correct task fixture types and static checks
* Consolidate replay test RPC imports
* Separate GitHub metadata imports from Linear hooks
* Scope mobile PR sidebar reads to the selected resource
* Separate desktop GitHub changes from phone updates
* Fix relay authority probe census across topology cases
* Repair repository owner proof fixtures and compiler allocation
* Preserve repository row observation in host lookup
* Seed metadata fixture before server-side store acquisition
* Preserve nullable fixture settings and discover mixed test types
* Preserve GitHub detail argument types and optional capabilities
* Let keyed details queries own pending read replacement
* Repair GitHub RPC and relay test fixture boundaries
* Verify expected GitHub account at repository execution capture
* Preserve captured GitHub account expectations through client dispatch
* Retain observed runtime status after switching environments
* Fix account contract fixture types and RPC setup timing
* Restore the negative-capability switch probe assertion
* Align account fixtures with runtime identity and configured origin
* Consolidate details test imports
* Drop duplicate fork pull request identity tests
* fix(review): reconcile hosted reviews after failed writes
* fix(review): reconcile PR page, phone and Checks after failed writes
- PR page: merge, auto-merge, close/reopen and reviewer changes reread details after every attempted write, and the page's displayed state follows a freshly read details state so buttons reflect what landed.
- Phone: the PR actions engine and title save reread once per attempted write after busy clears; a failed reread never replaces the write's outcome or turns a successful write into an error.
- Checks: a failed merge's error stays visible when the reread shows the review merged; a GitLab reread that settles after the panel switched reviews no longer commits details for the other context.
* fix(review): reconcile GitHub and GitLab item dialogs after failed writes
- GitHub item dialog: merge, auto-merge, close/reopen and reviewer changes reread details after every attempted write, after pending clears and after the close/reopen revert. Success toasts and patches stay success-only.
- GitLab MR dialog: merge, close, reopen, details save and reviewer changes run the dialog's existing refresh after every attempted write. The write's error toast and the user's drafts stay.
* fix(review): keep shown review data and ownership across write rereads
- Phone: a write's follow-up read that fails keeps the PR already shown and the write's own error instead of replacing the panel with a load error. Manual Recheck, Retry and HEAD refreshes still show a failed read.
- Phone: a load started for an earlier branch can no longer claim the current one, and a title write that settles after the view moved to another PR stays silent and skips its reread.
- Phone: an older title Save that finishes late no longer closes a newer edit or hides its failure.
- Checks: the GitLab details read after a write lands only on the review the panel currently shows; an old or fallback MR can no longer take over a replacement MR's checks and comments.
* fix(review): keep loaded item details on screen through rereads
- GitHub item dialog and PR page: when a write's reread (or any other invalidation) drops the cached details, the same item keeps showing its last loaded details while exactly one fresh read runs and if it fails, so the comment composer and its unsent draft stay mounted. A cold first load, a retry with no data and switching items still show loading and errors.
- GitLab MR dialog: the state badge and Merge/Close/Reopen follow the item's freshly read details, falling back to the list row; the Reviewers section stays visible while a reread runs; the load-error banner shows only when there is nothing loaded; switching items drops the previous MR's details before paint.
* fix(review): keep loaded details at their cache and scope GitLab details to the full target
- GitHub item dialog and PR page: invalidation keeps the loaded details in the cache entry, retires its pending read and owes exactly one fresh read, so Viewed, description, reviewer and checks updates keep landing on what is shown, even while that read runs or after it fails. A failed read, an empty result or an optimistic comment does not start another read. Removes the separate retained-details hook.
- GitLab MR dialog: details, reviewer/label options and drafts belong to the full target (task source, GitLab project, item and repo); switching source or instance with the same item id drops the previous target's reviewers and state, and a late result for the old target is ignored.
* fix(review): keep owed and running detail rereads through local field updates
Each GitHub details cache (item dialog and PR page) gets one payload-only patch operation that copies the entry's read ownership (an owed reread and the running read) by construction. Viewed, description, reviewer, checks and the optimistic comment all go through it; read start, settlement and invalidation stay separate. A comment that lands with a write's invalidation no longer cancels the owed reread, and a comment during a running reread no longer lets an unrelated invalidation discard that read. A comment alone still starts no read.
* fix(mobile): reread the PR after every attempted write on main's PR tab
Rebuilds this PR's mobile behavior on main's restructured PR tab:
- Engine and title/description edits reread after every attempted
write once busy/saving clears; the write's outcome is the only
feedback and a failed reread is contained.
- The controller gives writes a dedicated reread entry that a poll
can't skip, keeps the shown PR when the read fails, and retires a
details read started before the write.
- A reread whose checks read failed still shows the PR's new state
(merged/closed), keeping prior checks only for the same review.
- Details carry, dedup and completion key on repo + number, so the
same PR number in another repo doesn't inherit details.
- An older Save can't close a newer edit; a write that settles after
the view moved to another PR shows no error and rereads nothing.
* test: repair CI for the reread tests
- Use a fixed fetchedAt for the unrelated cache entry in the details
hook tests instead of reading the wall clock.
- Mock platform haptics in the mobile controller probe and text action
tests so they don't load react-native, and give the act callbacks
that awaited a load result a Promise<void> body.
* fix(mobile): publish PR details against the latest queued state
Phase-two details spread the last rendered PR data, so when they settled
before phase one rendered (a fast read, or a closed client failing at
once) they restored the PR state the reread had just replaced: a Close
or Merge the host applied still showed open. Details now patch only
their field through a functional update whose identity, sequence and
same-review checks run against the state React applies them to.
* fix: type the reread test fixtures and commit identity refs after render
- Replace type assertions in this PR's tests with typed fixtures; the
GitLab primary-actions test keeps one partial dialog-state cast with a
SAFETY note, as neighbouring hook tests do.
- Assign the mobile controller and text-action identity refs and the
GitLab dialog owner ref in a layout effect, so a render React discards
can't leave an identity that never committed for a late result to
check against.
* fix(github): route the saved-body patch through the details payload helper
Main's issue-body rule (a saved description supersedes a read already
running) now goes through the one field-patch helper, which keeps an
owed reread and copies the running read for every other patch.
* fix(github): replace a read retired by a saved issue description
A saved issue description drops the details read already running so it
can't restore the older body. When that read was an ordinary one (such
as the reread after a write), the dialog now owes one replacement read,
so the new conversation still arrives with the saved body. A Refresh
read keeps relying on its own loop, which already retries a superseded
attempt. Starting the replacement consumes the obligation, and a failed
replacement owes no retry.
* test: fix typecheck errors in the dialog and checks-panel reread tests
* fix(gitlab): keep a late write on the previous MR from touching the next one
A save, reviewer change, close/reopen/merge or comment that settled after
the dialog moved to another MR still reread and cleared busy state for
whatever was shown, restarting the new MR's first read and discarding its
answer. Those finalizers now reread and clear busy only while their own
MR is still shown, as pipeline retry already did, and switching MRs
resets the save, action and comment busy flags so the next MR is never
left busy.
* test(gitlab): give the pipeline tab test a details owner after the main merge
* fix(github): prefer the open PR when a branch has several
The branch lookup asked GitHub for one PR across all states. GitHub sorts
a branch's PRs newest first, so a closed PR opened after the live one
shadowed it and got linked to the worktree on every checkout.
Fetch a page of the branch's PRs, REST and the `gh pr list` fallback alike,
and take the open one; with none open, keep the newest as before.
* refactor(github): keep branch lookup casts on their own lines
---------
Co-authored-by: agustin2606 <agustinvarela2606@gmail.com>
* Preserve repositoryless GitHub Project items
* Keep only draft and restricted Project items without a repository
Key the repository-scope exemption on item kind on desktop and phone so
an older host's content-less Issue/PR rows stay hidden as before. Draft
titles, cards and bars stay non-interactive with no row browser icon;
the toolbar's Open view in GitHub is the Project-level action. Phone
labels restricted items "Restricted" to match desktop. Normalization
assertions move to a main-process test so renderer tests no longer
import main code.
* Cover draft Status normalization and phone restricted-item copy
Restore the check that a draft's single-select Status survives
normalization, and render the phone Project list and detail drawer with
a draft and a restricted item using the real status labels.