Skip to content

fix(run-panel): pin scroll to latest message when opening a task - #3

Merged
alamops merged 1 commit into
mainfrom
agetor/e38174ff2d30-scroll-messages-list-to-the-last-one-whe
May 19, 2026
Merged

fix(run-panel): pin scroll to latest message when opening a task#3
alamops merged 1 commit into
mainfrom
agetor/e38174ff2d30-scroll-messages-list-to-the-last-one-whe

Conversation

@alamops

@alamops alamops commented May 19, 2026

Copy link
Copy Markdown
Owner

Reset nearBottomRef on task switch and add a short rAF loop keyed on task.id so multi-frame layout (markdown, code blocks, tool results) can't leave the viewport short of the most recent message. Both scroll paths share the nearBottomRef gate, so a user who scrolls up during the open window is never yanked back down.

Reset nearBottomRef on task switch and add a short rAF loop keyed on
task.id so multi-frame layout (markdown, code blocks, tool results)
can't leave the viewport short of the most recent message. Both
scroll paths share the nearBottomRef gate, so a user who scrolls up
during the open window is never yanked back down.
@alamops alamops self-assigned this May 19, 2026
@alamops alamops added the bug Something isn't working label May 19, 2026
@alamops
alamops merged commit 1993f34 into main May 19, 2026
alamops added a commit that referenced this pull request Jul 8, 2026
Rounds out the PR action set:

- reopenGitHubPull(): PATCH /pulls/:n {state:"open"} — symmetric with the
  existing close. New POST /github/pull-reopen route + api client. A
  "Reopen" button replaces the "closed" note in the Actions header.
- setGitHubPullDraft(): REST has no draft toggle, so it reads the PR's
  node id then runs the GraphQL convertPullRequestToDraft /
  markPullRequestReadyForReview mutation. New POST /github/pull-draft route
  + api client. A "Convert to draft" / "Mark ready for review" button shows
  in the Actions header for open PRs; toggling refreshes mergeability
  (draft flips mergeable_state).
- Tests: draftFromGraphql parsing via __githubInternals.
alamops added a commit that referenced this pull request Jul 8, 2026
… reopened row, test graphql errors

Addresses the batch #3 review:

- Add mergedAt to GitHubListItem (normalizeItem reads merged_at). The row
  header now badges merged PRs violet + "merged" (vs rose "closed"), which
  state:"closed" alone conflated.
- Reopen is shown only for closed-unmerged PRs; merged PRs show a "Merged"
  note instead of a button that always 422s.
- upsertListItem gains keepIfPresent so a reopened row stays visible under a
  "closed" filter (drops out on next refresh) instead of vanishing with an
  unseen success message.
- Extract graphqlErrorMessage() from setGitHubPullDraft and unit-test it
  (first message, non-string message fallback, empty/missing errors).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant