The base branch (#7965) is merged, so this branch now targets master.
Conflicts came from #8452 in the forge changes view:
- ChangedFiles.tsx: this branch's Row component (hover marquee, rename
tooltip) takes master's viewed state: the subdued class, its
description for assistive technology, and `done` down the tree.
- ReviewControls.tsx: master keeps every segment's Tooltip mounted; this
branch's 500ms hover delay stays on it.
- ChangesTab.module.css: master's gap-step rules stay; the local changes
card's rules stay removed, as the card moved into the Session panel.
- The forge README is merged sentence by sentence and its pairing
record re-recorded.
Corrected tokens were kept under a run's side and line numbers only and
survived a new comparison of the same file. Tokens carry their lines'
text, so a refresh that kept the line numbers but changed the content
drew the last change's text, and a change request's file kept it until
a gap was expanded again. Every key now names the file's change digest,
so another change finds none of the old tokens from the render that
names it.
Rows drawn after collapsed unchanged lines were highlighted as if the
file started there, so a code block, comment, or string that opened in
the collapsed lines colored them wrongly. Once a file's whole new side
is known, each run of rows is now highlighted again in idle time after
up to 120 lines of the file before it, the old side rebuilt from the
new side and the hunks. The first draw still highlights in the same
render, and the new colors wait while the reader selects text in the
file. Local files are read for this once per comparison when they
draw; change request files only once an expansion has read them.
A gap over 20 lines now offers a step down from the hunk above it and a
step up from the hunk below it, as GitHub's diff does, instead of drawing
every hidden line on one click. Gaps of at most 20 lines still expand at
once, and the first click on the unknown lines after the last hunk reads
the file and shows their first 20.
A lens registration's disposer now waits for the classification itself,
and a run whose registration ended or whose caller left before it started
never reaches the lens; changesLens refuses a lens withdrawn while the
files were read and a local result whose files changed during the run.
The extension state names each lens's version, so the view keys results
by source, files, lens, and version. Hunks holding an open comment form
or a saved browser comment stay unfolded, the view reads threads and
viewed marks again on reviewRevision, a thread jump clears a lens that
hides its file, and the Client entry re-exports the lens types.
Provide ctx.forgeChanges, which mints and reads changes addresses, opens a
view in the shown Session, takes the titles of Host lenses, and registers
line annotation sources. The changes toolbar gains a lens menu that keeps
the files a chosen Host lens keeps, folds the hunks it is not about, and
folds into the More menu at level 2 while no lens is chosen; failed,
refused, and interrupted runs show a notice with a retry and a clear.
Five slots open the view to plugins: forge.changes.toolbar,
forge.changes.file.menu, forge.diff.line.annotation (keyed by source),
forge.diff.comment.actions, and forge.change-request.card.actions.
Annotations stack after the comment form, the browser drafts, and the host
threads of their last line, in the column of their side; none draw before
a section comes within reach, and maxAnnotationsPerFile bounds a file.
Icon and info tooltips in the changes view wait 500ms of hover and still show
at once on keyboard focus. The file tree names only a renamed file's paths,
since the tree already shows each directory, and a clipped name crawls into
view on hover. The thread count, review time, and viewed shortcut hint move
from native titles to the shared tooltip.
A change request's view of all its commits reads and saves viewed marks
on the code host, disabling a checkbox while its mark is saved and every
checkbox when the marks cannot be read; local changes and chosen commits
keep their marks in the browser. The expanded card shows one row per
fact with a glyph and its value: checks open a grouped menu that reruns
failed ones, the review row shows reviewer avatars and requests reviews,
the merge row updates a head behind its base at the displayed head, the
changes row counts unresolved threads, and linked issues take one row.
A narrow changes toolbar wrapped its controls onto a second row and the
header's buttons broke their labels across two lines. Side by side, a
right-side comment was placed with clamp(10px, 100% - 700px, 50% + 10px),
so below about 1,420 px it crossed into the left column, and only one
comment editor could be open at a time.
The toolbar now keeps one line. observeToolbarFold measures what each
fold level needs and sets data-fold to the shallowest level that fits:
level 1 moves the line totals, expanding all files, two columns, and
wrapping into a More view options menu, level 2 the test file switch,
with the viewed progress shown as a ring and a count, and level 3
refresh; at level 3 the file list entry shortens its label. The menu
lists the controls of the level shown when it opens. Measuring instead of
fixed widths keeps every locale on one line: the full toolbar needs about
650 px in Chinese and nearly 800 px in Russian. Header buttons keep their
labels on one line.
Side by side, the comments that end on a row now sit in a row of two
cells under its columns, each continuing its line's gutter and
background, so a left and a right comment share the row. Any number of
editors can stay open; choosing an open editor's range focuses it.
Resolves#8176
Deferred idle-time highlighting drew token text, so a file whose content
changed at the same path kept showing its previous text until the next
pass, and replacing the plain text collapsed a selection made meanwhile.
Sections highlight in their drawing render again, as before.
File sections now take the tab's visibility as a prop and the reach
tracker through their handlers, so no business component reads a React
context.
The unresolved count on a file header opened the whole thread list scrolled to that file, which covered the code in
a narrow view and did not tell the file's threads apart. Each click now goes to the file's next unresolved thread in
the order its section shows them: threads on the whole file, threads on lines by the row of their last line,
outdated threads, then threads the chosen commits do not hold; after the last it starts again from the first. The
thread list orders each file's threads the same way, and the Threads toolbar button alone opens it.
The thread list chooses Unresolved, Resolved, or All in the segmented radio group the lens uses, and drops the
Outdated and Awaiting my reply filters with the Awaiting my reply tag. Its footer keeps only View on GitHub, after a
note when the read was truncated, and each file group names the file before its directory.
The list's width rules queried the changes view's container by name, which CSS Modules rename per file, so they never
applied and a narrow view squeezed the files beside a 320px list. The rules now query the nearest container: a view
at least 1040px wide docks the list; a narrower one floats it over the files with a scrim, moves the focus into it,
and closes it before opening a thread; below 480px it takes the files' whole width with Back to changes. Escape, the
scrim, and the close actions return the focus to the Threads button. Below 480px a file header shows the unresolved
count alone and thread cards keep 6px margins.
Highlighting waits until the page is idle and the scrollport has been still
for 200 ms, so a slow grammar's first tokenization never interrupts a scroll.
Adds the Agent Note recording the changes view decisions.
- Read a change request's patch and .gitattributes together.
- Publish a panel state only when it differs from the published one.
- File sections receive stable values and redraw only when theirs change;
tab visibility reaches only the menus that need it.
- An expanded file draws its lines once its section comes within reach of
the scrollport, and highlights them in idle time in bounded fragments,
again only when its segments or its language's grammar change.
- A jumped-to file stays aligned while the sections around it draw.
The card's overflow clip cut off the viewed mark and the file menu when a
narrow header also held a long path, the changed tag, and a rename badge;
before the cards, the list could still scroll sideways to them.
The icon, path, changed tag, and badge now share one box that shrinks to
any width, so the counts, the viewed mark, and the menu after it stay
whole. The path and badge shorten in proportion to their widths, the
changed tag is capped at 30% of the box with an ellipsis, and the path
keeps its full-path tooltip.
A 390px e2e renames a long file, changes it after it is marked viewed,
and checks that the mark and menu stay inside the card, the mark still
toggles, and hovering the name shows both paths.
Threads read at the shown head sit under the row of their last line, or
after the collapsed lines that hold it; resolved threads fold into one
row, file threads open their file, and outdated threads gather after the
lines with the end of their recorded hunk and the file at the commit
they were written on. Chosen commits place only new-side threads whose
lines number the last chosen commit.
The file tree and file headers count unresolved threads, and a thread
list filters unresolved, outdated, resolved, and awaiting-my-reply
threads by file and opens each at its place. A thread offers only Add to
input, which quotes the whole thread, and View on GitHub.
The changes view gains a lens of All, Interface, Implementation, and Tests
that spans the file tree above it, a switch that hides test files from the
tree and the diff, and a viewed checkbox on each file header that collapses
the file. The toolbar counts viewed files and V toggles the file being read.
Marks are kept per Session, source, path, and change digest in browser
storage, so a file that changes again reads as changed since viewed. All
commits beside Submit review, and beside the base branch of the Branch scope,
shows one commit or a Shift run of commits.
In unified rows that show both line numbers, the left plus now moves past the right number into the sign column, where the right plus already sits. It paints above that number's padding, the sticky file header stays above it, and a row that shows the labeled plus offers no second hover plus. The labeled plus of a left context line is reachable again, and a deleted line's plus no longer jumps one column.
A drag that starts on a hover plus extends through every row with a line on its starting side, wherever the pointer crosses the row. A press whose range is refused, such as Shift across hunks, keeps the previous selection and no longer opens the editor for it on release.
The README describes the checks mark as the filled head branch end.
Refs #7937
Show a comment plus beside the line number of the hovered diff line. Pressing it selects the line, dragging extends the range on that side, and releasing opens the editor, replacing the separate select and plus clicks for mouse users. Touch and keyboard users keep the existing path through the line number. Two-column code reserves an empty lane for the plus, so the number and the code stay reachable.
Draw the Session row's checks outcome inside the change request glyph as a filled head branch end, smaller and without the ring, so it cannot drift from the glyph's outline.
Refs #7937
The changes view cut each changed path from its end, so a long path lost
its file name, and the Session header's branch label crowded the actions
beside the title.
- A changed file in the files menu, a file's header, and the local
changes card shows its name, then its directory in smaller subdued
type. The directory shortens first, then the name shortens in the
middle and keeps its end; hovering shows the complete path, and both
paths of a renamed file. Assistive technology reads the complete path.
A rename badge names the old file name, or the old path when only the
directory changed.
- The checkout row draws a folder for the project directory and a
branch for a worktree.
- The Session header no longer carries the branch label; the tab's
checkout row names the branch, the kind of checkout, and its path.
- The README describes the collapsed strip of a large file, and the
forge bundle README lists the gh commands and branches that bind
change requests.
A large file in the changes view started behind a notice and an outlined
button. It now starts as one strip drawn and opened like the collapsed
unchanged lines, which names its changed line count. Binary files and
files too large to show use the same strip without an action.
The forge panel opens a changes view in the right sidebar for the
checkout's local changes and for the diff of each change request.
- ForgePanelController reads local diffs in the branch, uncommitted,
unstaged, and staged scopes through Git in the Session's read-only
sandbox, change request diffs through the forge provider, and the text
of a changed file to expand unchanged lines. Change request patches stay
cached by head commit and base branch within maxCachedDiffBytes. A local
diff over maxDiffBytes fails as forgePanel/diff-too-large, and a provider
read over its output limit fails as too-large, which the view explains
with a link to the code host; a gh timeout fails as unavailable.
- forge adds the diff, fileText, and fileUrl provider methods and the
too-large failure code, and forge-github implements them with gh.
- The panel shows a local changes card that opens the view and asks the
Agent for a change request. The view collapses files past a line
budget, draws lines side by side or in one column with optional
wrapping, expands unchanged lines on request, and collapses or expands
every file from its toolbar; file headers use a bare chevron.
- The checkout row copies the worktree or project directory path, the
refresh glyph turns while a refresh runs, change request cards keep
their actions while collapsed, and the header entry uses the shared
compact button.
- client-ui-forge classifies changeRequestKey and FsError as
peer-required Host imports, which keeps forge and dsh-fs as its peers.