Skip to content

feat(github): add a compact sticky pull request header - #592

Merged
nixuuu merged 1 commit into
devfrom
feat/pr-panel-sticky-header
Nov 12, 2026
Merged

nixuuu merged 1 commit into
devfrom
feat/pr-panel-sticky-header

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Change

The pull request panel now scrolls its header, tabs and content together. After the full header scrolls away, a compact sticky bar retains the PR state, repository and number, truncated title with tooltip, check status, primary lifecycle action, menu and close button. The tabs, Timeline filter and Code controls stack below it with opaque backgrounds.

The full header keeps its flow height, so switching to the compact bar changes neither the content offset nor scroll position. IntersectionObserver supplies a 16 px hysteresis band; ResizeObserver updates dimensions on resize. The transition uses existing motion tokens and becomes instant with reduced motion. Each tab retains its own session scroll position. The compact primary action shares the original lifecycle controller and confirmation dialog. Long action labels truncate within the compact button without covering the menu.

This applies to web/desktop and the phone-width web sheet. Native mobile has a separate virtualized-list layout whose headers already scroll with their lists; its code is unchanged. Rebased onto dev after #589.

Related: #551, #555

Verification

  • Dependency installation, bun run gen:check, full typecheck, lint, format check and web build passed on the review machine. The final build used nice -n 10. Final-head CI static checks and web/Linux builds passed; the full test suite with temp-directory checks is running in GitHub CI at the maintainer's request. No web UI tests added.
  • Fixture-only Chromium review covered a 200-comment timeline, 90-file Code tab with a 1,500-line expanded diff, short PR, long names/title/branches, 320/576/1056 px panel widths, 390 px phone width, light/dark, reduced motion, menu, title tooltip, close and primary-action confirmation. No application errors. No live GitHub calls from the fixture app. Review processes, containers and scratch checkout were cleaned up.
  • Slow threshold crossings retained the compact state across the 16 px deadband. Content flow position stayed at 300 px through compaction; requested scroll positions did not change. Timeline 1600 px and Code 900 px positions restored on tab switches. Diff scrolling remained horizontal per file; no nested vertical viewport. Reduced-motion transition duration was 0s. Sticky surfaces had no visible gaps or see-through seams.
  • Chromium 155 Performance traces on the final source: 180 animation-frame samples each. Timeline: 3 layout events totaling 1.038 ms; expanded diff: 0 layout events. Both: 0 long tasks, maximum frame interval 16.8 ms, 0 intervals above 25 ms. Evidence remains outside the repository.
  • EAS fingerprints before/after, generated locally with nice -n 19, are unchanged: iOS 74705db3a68907bc28379bb9b1080a227bc0755b; Android 7d38be8f5c9bf842d62060c75820a206f99c87e3.

Copy audit (§8): compact controls reuse existing state, check and lifecycle labels. Refresh remains available in the compact menu (Refresh pull request, reused wording). Icons retain accessible labels. Truncation retains the full title in a verified tooltip, the PR number stays visible, and primary actions retain their full accessible labels and tooltips. Short and long text was checked at narrow, wide and phone widths. No new errors, empty states, glossary terms or humorous copy.

@nixuuu
nixuuu force-pushed the feat/pr-panel-sticky-header branch from 94d748f to a844441 Compare November 12, 2026 22:20
@nixuuu
nixuuu force-pushed the feat/pr-panel-sticky-header branch from a844441 to bb47880 Compare November 12, 2026 22:25
@nixuuu
nixuuu marked this pull request as ready for review November 12, 2026 22:30
@nixuuu
nixuuu merged commit 7376716 into dev Nov 12, 2026
11 checks passed
@nixuuu
nixuuu deleted the feat/pr-panel-sticky-header branch November 12, 2026 22:36
nixuuu added a commit that referenced this pull request Nov 12, 2026
The Link pull request picker used three-line rows, a wrapping status
column and a separate URL form button. Web/desktop and mobile now use
two-line rows with compact branch/linked icons, short ages, reserved
status space and a single header containing the repository, optional
account switcher and Open/All control.

Search uses “Search or paste a link”. A number or GitHub PR URL adds
“Link #123” or “Link <url>” as the first selectable result. The existing
Combobox handles keyboard navigation. Direct links use the existing
owner-scoped gateway action; failed direct links retain the
repository-access form. The separate “Link by URL” button is removed.
Mobile changes are JavaScript only.

Fixes: #553

## Verification

- Rebased on current `dev`, including #589 and #592. `bun install
--frozen-lockfile`, `gen:check`, `typecheck`, `lint`, `format:check` and
the web build passed on the dedicated review computer with `nice -n 10`.
`git diff --check` passed. GitHub CI runs the full test shards with
their temp-directory checks. No web UI tests were added or run.
- Reviewed actual picker components in one Chromium session using
temporary in-memory API fixtures: 0, 1 and 50 PRs; short and long
titles, branches and account names; current branch + linked icons;
Open/All; account selection; internal scrolling; numeric and URL linking
with the keyboard; failed-link recovery; URL linking without a GitHub
remote. Covered light/dark, desktop 1280×800 and phone 390×844, plus a
320px width check. No real GitHub API calls. Browser review caught and
fixed long account-name overflow; the 390px page has no horizontal
overflow. Temporary fixture files and processes were removed.
- EAS CLI 27.4.1 production fingerprints generated locally with `nice -n
19` match `dev`: iOS `6ddec9ef559ee0095ac33e94ff9418a942053b17`, Android
`5f6eae3ab278f1cd543e9ed763f923a319b65ec9`. Mobile changes are
JavaScript only. The native mobile sheet was typechecked but not
reviewed in a simulator.

## Copy audit — docs/copy.md §8

- “#123, title, branch, author or URL” → “Search or paste a link”: the
maintainer-requested short search hint retains the accessible “Find a
pull request” label.
- “Link by URL” → first result “Link #123” / “Link <url>”: verb-led
actions in sentence case; no duplicate input or permanent footer action.
- Visible “Current branch”, “Yours” and “Linked” text → labelled icons
(tooltips on web, accessible labels on mobile). Reserved space prevents
status changes from shifting the title. Long metadata uses truncation
and the shared compact age formatter.
- Existing connection/access/rate-limit messages and recovery actions
remain. No new glossary terms, jargon, humor, or color-only status cues.
Short/typical/long text was reviewed across desktop/phone and
light/dark. Audit checklist §8: sentence case and concise actions,
glossary unchanged, verb-led linking actions, actionable errors, concise
empty states, no duplicate status text, dependency recovery preserved,
no “soul” copy, long names checked, icon states have accessible labels.
nixuuu added a commit that referenced this pull request Nov 12, 2026
## Change

Cite now inserts an atomic citation token at the composer's saved caret,
so quoted passages can sit between sentences. The floating action,
desktop selection context menu and shortcut use the same insertion path.
Tokens show a compact excerpt, reveal the full passage and source on
hover/focus, and open an editor with a source action. They survive
composer copy/paste and undo, render inline in sent user bubbles, and
replace the old tray on web and mobile. Mobile uses the existing JS text
badge editor without native changes and keeps the system selection menu.

The gateway stores UTF-16 ranges and expands each quote into a clearly
delimited block at that position for Claude, Codex and Grok. Proto
fields are additive; older clients retain their existing quote-note
format. Source references are owner-scoped, and queue editing preserves
or replaces citation ranges. Old saved drafts normalize to inline tokens
when opened.

The collapsed composer omits the separate citation count: excerpts
already appear in the first draft line. Attachment and mention counts
remain. Rebased on `dev` at `cafed16af`, retaining #589's measured
composer coverage and expand/collapse animations and #592/#593's PR
panel changes.

Related: #587

## Verification

- Passed: `bun install`, `bun run gen:check`, `bun run typecheck`, `bun
run lint`, `bun run format:check`, and the web build on the isolated
review host.
- Final focused gateway integration across the stack: 12 tests pass, 122
assertions, no temp leftovers. Covers all three fake CLIs, quote
order/placement and persistence, mention shifts, legacy clients, queued
edits/removal, invalid ranges, cross-owner rejection and cached PR
citations. Full GitHub CI is green: static checks, all four test shards
and web/Linux builds.
- Remote monolithic `check:tmp`: 2,540 pass, 166 opt-in skips, one
existing import memory-budget failure late in the long-lived process.
The unchanged 160 MB import test passed in isolation at +127 MB against
its 400 MB budget (11 ms scan). The full CI shards pass it too. Both
remote runs left no test temp directories.
- Manual Chromium review: 1, 3 and 10 citations at different positions;
edit, atomic deletion, undo/redo, composer copy/paste, long multiline
quotes, thread and bot source navigation, sent bubbles and reload.
Checked light/dark at desktop, narrow and phone widths. The desktop
context menu shows Cite/Copy text, inserts the citation, and restores
composer focus; Copy text was verified by pasting into the composer.
Final rebased build reviewed. No web UI test suite added.
- Final development-profile EAS fingerprints, generated with `nice -n
19`, match the bottom-layer baseline: iOS
`86872d18eade9d3c6e0c54b0c328bccd5e5d226c`, Android
`d67c35d4de5511168d4b7c568c1f42c5df4f293d`. The iOS fingerprint JSON
comparison is empty. Native project generation and both Android/iOS JS
exports pass. Expo Doctor passes 19/20 checks; its only finding is newer
patch versions for 13 unchanged dependencies. Native device interactions
have not been reviewed.

## Copy audit

- Tray controls → `Edit citation`, `Quoted passage`, `Comment
(optional)`, `Jump to source`, `Cancel`, `Save`: compact sentence case,
verb-led actions, and the existing citation/quote glossary distinction.
Updated the glossary definition for inline tokens.
- Icon-only excerpt → `Citation: <excerpt>` accessibility labels; full
passage, author, source kind and time remain available without relying
on color or icon shape.
- Missing-source message → `Could not find the source. Try loading
earlier messages.` (web) / `Could not find the source. Retry to load it
again.` (mobile): states the failure and a recovery action.
- Desktop native selection menu → `Cite` / `Copy text`, with the
existing shortcut hint. `Could not copy the text. Select it and try
again.` gives a recovery action; `Copied` confirms success.
- Removed redundant citation counters and the separate tray. No new
empty states, marketing copy, jargon, or decorative sentences. Short
excerpts, typical content and long multiline text reviewed in both
themes at the requested widths.
nixuuu added a commit that referenced this pull request Nov 12, 2026
)

## Change

Pull request comments, published and pending inline review comments,
review summaries, failed checks/jobs and displayed log excerpts now
offer **Send to agent**. The action adds a PR citation at the thread
composer's saved caret and focuses the composer, so the user can write
around it before sending. Web also offers Cite for a selected passage.
Mobile uses the existing JS text badge and editable-excerpt sheet, with
Cite in the item menu.

Tokens show a PR mark, author and excerpt. Their preview includes the
full quoted passage, repository/PR number, source URL, time and review
file/line. Sent bubbles retain the inline source. The gateway resolves
source metadata from the owner's selected account cache and current
access revision, requires the PR to remain linked to the destination
thread, and includes up to 8,000 characters of cached diff hunk context.
Sending or editing a queued message never fetches from GitHub. Proto
changes are additive.

Stacked on #591 using `gh stack`; the bottom PR targets `dev`. Both
branches were rebased onto `dev` at `cafed16af`, retaining #589's
composer coverage and motion changes plus #592/#593's PR header and
compact picker.

## Verification

- Generated contracts with `bun run gen`; changed files formatted and
linted individually on the local host.
- Added gateway → real worker → fake Claude/Codex/Grok CLI integration
coverage for text position, source metadata, bounded cached diff
context, persistence and no GitHub requests on send. Additional cases
cover failed checks/jobs/log excerpts, foreign-owner sources, missing
resources, unlinked PRs and revoked access revisions.
- Passed remotely: `bun install`, `bun run gen:check`, `bun run
typecheck`, `bun run lint`, `bun run format:check` and the web build.
Final focused gateway integration across both PRs: 12 tests pass, 122
assertions, no temp leftovers. Full GitHub CI is green: static checks,
all four test shards and web/Linux builds. One shard needed a retry
after a computer-move fixture connectivity failure; those cases also
passed in the full remote run.
- Remote monolithic `check:tmp`: 2,540 pass, 166 opt-in skips, one
existing import memory-budget failure late in the long-lived process.
The unchanged 160 MB import test passed in isolation at +127 MB against
its 400 MB budget (11 ms scan). The full CI shards pass it too. Both
remote runs left no test temp directories.
- Manual Chromium review with fixtures: failed check, failed job, log
excerpt, review summary, selected comment and inline code comment; icon
and item-menu actions; insertion between surrounding text; source
metadata; edit, atomic delete/undo; sending multiple source types in
order and inline sent bubbles. Reviewed light/dark, desktop/narrow/phone
widths with long titles and multiline quotes. The phone action closes
the PR sheet and keeps composer focus after navigation. Native device
interactions are unverified.
- Mobile changes are JS-only. Final development-profile EAS
fingerprints, generated with `nice -n 19`, match the bottom PR exactly
on both platforms: iOS `86872d18eade9d3c6e0c54b0c328bccd5e5d226c`,
Android `d67c35d4de5511168d4b7c568c1f42c5df4f293d`. The iOS fingerprint
JSON comparison is empty. Native project generation and both Android/iOS
JS exports pass. Expo Doctor passes 19/20 checks; its only finding is
newer patch versions for 13 unchanged dependencies. No native
configuration or dependency changes.

## Copy audit

- Actions: `Send to agent`, `Cite`, `Item actions`, `Open on GitHub`.
Sentence case, verb-led, shared across surfaces. Send to agent adds a
draft citation and does not submit a message.
- Citation tokens keep `Citation: <excerpt>` accessibility labels. The
preview names the repository, author, time and file/line without relying
on the icon or color.
- Recovery: `Citation source unavailable. Refresh the pull request and
add it again.` and `Quote limit reached. Remove a quote, then retry.`
Each explains the state and gives the next action.
- Reused existing edit/cancel/save copy and compact kit components. No
new empty states or marketing copy. Short, typical and worst-case
excerpts, long PR titles and multiline quotes reviewed at
desktop/narrow/phone widths in light/dark themes.
nixuuu added a commit that referenced this pull request Nov 13, 2026
Overview thread updates cleared every cached PR snapshot with
`forget()`. A panel that had already loaded consequently unmounted its
header and sections, showed first-load skeletons, and lost scroll and
expansion state. Reconnection after an overview gap did the same.

Use stale-while-revalidate invalidation for these two refresh paths in
the shared web/mobile cache event mapper. The existing panel, standalone
PR page, checks, timeline/reviews, files, commits and pending review
reads keep their mounted content. Account/access-revision boundaries,
authoritative home snapshots, computer removal, pairing changes and
denied-read handling retain their existing private-data protections.

Fixes: #501

Validation:
- Reproduced in Chromium on the review machine with a disposable
gateway/BFF reading the real `itsoltech/canopy` PR #592. Delayed the
summary response by 300 ms and sampled animation frames after loaded
Timeline content. Before: 21/119 frames showed skeletons, the original
row detached, scroll 132 → 0. After: 0/121 skeleton frames, original
timeline/row retained, scroll stayed at 132.
- Added cache-layer coverage for delayed revalidation with concurrent
consumers, overview gaps, refresh failure, unchanged thread revisions
and a separate uncached PR. Existing revocation/late-response coverage
passes. No UI tests added.
- Final browser matrix: 760 animation-frame samples across Summary with
all 11 checks visible, expanded Code/diff, standalone PR page, desktop
thread panel and 390 px sheet, light/dark. Triggered thread revision
updates, overview gaps, a watch-style snapshot/page invalidation, and
manual refresh. Zero skeleton frames or section detachments; scroll and
the expanded file/check-list state remained unchanged. Review browser,
processes, containers and checkout were cleaned up.
- Audited web/mobile section cache keys, pagination invalidations and
retained visited tabs. Native mobile uses the same changed
`OverviewInvalidation`; mobile typecheck passes, but no native UI/device
run was performed. Live job-detail reads and avatar requests returned
existing errors in the disposable setup; successful job/log refresh is
not claimed by the browser evidence.
- All requested handover checks passed with `nice -n 10`: dependency
installation, `gen:check`, full typecheck (including mobile), lint,
formatting, format check, full `check:tmp` and web build. Full tests:
**2678 passed, 166 opt-in/skipped, zero failed**, 34,947 assertions
across 501 files; nothing left in the tests' private temp directory.
Final-head CI static checks, all four test shards, web/Linux builds and
commitlint are green.

Copy audit (§8): no user-facing text changes. The existing loading,
error and Retry wording remains in use.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant