feat(gastown): add Refinery Activity Log timeline to Merge Queue page#1473
Closed
Conversation
…1299) * feat(gastown): configurable terminal orientation and drag-to-resize (#1237) Terminal bar can be positioned at bottom/top/left/right with drag-to-resize. Position and size persisted to localStorage. Collapsed state only reserves the tab bar strip. Dynamic page padding replaces static pb-[340px]. DrawerStack offsets when terminal is on the right. * fix(gastown): clamp size on orientation switch, add vertical close button Re-clamp persisted size when switching position so horizontal minimum (100px) doesn't persist as a too-small vertical width (min 200px). Show close button on agent tabs in vertical mode via absolute positioning on hover. * fix(gastown): fix terminal resize handle and position picker for left/right orientations - Make resize handle a flex child instead of absolute positioned to avoid z-index conflicts with framer-motion stacking contexts - Add visible hover indicator pill on resize handle for discoverability - Remove width/height from CSS transition so drag resize is immediate - Use fixed positioning with viewport clamping for position picker popup to prevent overflow on left/right orientations
Add a vertical timeline section showing refinery activity in natural language. Each entry renders the action type (merged, failed, PR created, rework requested, review submitted) with color-coded timeline dots, clickable bead titles that open the drawer stack, and metadata like commit SHAs and PR links. Events are filtered from getTownEvents and sorted newest-first with pagination.
…ed data Switch from raw getTownEvents to the new getMergeQueueData tRPC procedure. The enriched activityLog entries provide pre-resolved agent names, source bead titles, convoy context, review metadata (PR URLs, target branches, merge commits), and rig names — eliminating the need to dig through untyped event metadata.
| if (eventType === 'review_completed') { | ||
| return entry.event.new_value === 'merged' ? 'merged' : 'failed'; | ||
| } | ||
| return eventType as ActionType; |
Contributor
There was a problem hiding this comment.
WARNING: status_changed entries will crash this timeline
getMergeQueueData() now includes status_changed events, but resolveActionType() force-casts every non-review_completed event into ActionType even though the union/config omit status_changed. When one of those rows reaches TimelineEntry, ACTION_CONFIG[action] is undefined and the render throws on config.icon. Add a status_changed branch/config here, or filter that event type out before rendering.
Contributor
Code Review SummaryStatus: 1 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Other Observations (not in diff)None. Files Reviewed (13 files)
Reviewed by gpt-5.4-20260305 · 962,136 tokens |
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.
Summary
Adds a new
getMergeQueueDatatRPC procedure and backend query that powers both the "Needs Your Attention" and "Refinery Activity Log" sections of the Merge Queue page. The backend query inreview-queue.tsfetches enriched MR bead data with full joins to source beads, convoy metadata, agent metadata, review metadata, and rig names. The frontendRefineryActivityLog.tsxcomponent renders a vertical timeline with color-coded dot/line indicators per action type (merged, failed, pr_created, pr_creation_failed, rework_requested, review_submitted, status_changed), natural language descriptions, convoy grouping with progress bars, clickable bead titles that open drawers, metadata lines with commit SHA and PR links, and client-side pagination. Also includes the configurable terminal orientation refactor (#1299) as a dependency.Verification
pnpm typecheck— passes clean across all packagespnpm lint— passes (oxlint + eslint across all packages)pnpm format:check— passesascasts or!assertions introduced, parameterized SQL queries, Zod validation on all IO boundariesVisual Changes
N/A (new page section — no before state exists)
Reviewer Notes
2b4bd684, PR feat(gastown): configurable terminal orientation with drag-to-resize #1299) which is a dependency cherry-picked onto this branch. Those changes toTerminalBar.tsx,TerminalBarContext.tsx,TerminalBarPadding.tsx,DrawerStack.tsx, and layout files are from that merged PR and not new work in this bead.review-queue.ts(backend query, +531 lines),schemas.ts(+108),router.ts(+21),Town.do.ts(+8),RefineryActivityLog.tsx(+351), andMergesPageClient.tsx(refactored to use new endpoint).getMergeQueueDataquery uses raw SQL with thequery()utility rather than Drizzle's query builder — this is consistent with the existing pattern inreview-queue.tsfor complex multi-join queries.