Add in-app pull request tracker - #113
Conversation
There was a problem hiding this comment.
🤖
Reviewed at exact head dca08da4f1254dc6d0ea008de6e7c6f73c1739f6. The subprocess, IPC-validation, SQL-parameterization, timeout, and URL-boundary work is unusually careful, and the scroll/state-dir refactors are coherent.
Update after discussion: I am withdrawing my earlier findings about transcript-based project association and stale PR rows after authentication loss. The remaining concern is the default 30-second polling behavior and its database-query cost.
Blocking behavior
The production-default experiment continuously polls GitHub for every user without an explicit override.
src/features/experiments/experimentDefinitions.ts:89-93 sets defaultEnabled: true. This is not dev-only: resolveAutoEnabled returns autoEnable || defaultEnabled, and experimentPreferences.test.tsx:219-230 explicitly asserts that a defaultEnabled: true experiment is enabled with DEV=false. That mounts WorkStatusBridge, whose initial request and 30-second interval (WorkStatusBridge.tsx:76-78) repeatedly shell out to gh api graphql.
Please remove the production default-on override, increase or otherwise avoid the unconditional 30-second polling cadence, or document the explicit product decision and a bounded polling design.
Performance risk worth investigating
WORKSPACE_CANDIDATES_QUERY (src-tauri/src/commands/pr_tracker.rs:31-79) joins and aggregates the complete messages history before applying the 25-workspace limit on every enabled refresh. The outer timeout limits waiting but may not bound the SQLite work itself. Please investigate the query plan against a realistically large history and, if it confirms the risk, move bounded/indexed activity selection ahead of full aggregation or otherwise avoid repeatedly rescanning all messages.
The nine GitHub checks were green at the reviewed head. Independent Blox validation also reported full Vitest (566 files / 6,668 tests, 1 skipped) and the sanctioned Tauri test recipe passing. Those checks did not establish the production polling/query-cost behavior above.
Co-authored-by: Jon Tirsen <tirsen@squareup.com> Signed-off-by: Jon Tirsen <tirsen@squareup.com>
Co-authored-by: Jon Tirsen <tirsen@squareup.com> Signed-off-by: Jon Tirsen <tirsen@squareup.com>
Co-authored-by: Jon Tirsen <tirsen@squareup.com> Signed-off-by: Jon Tirsen <tirsen@squareup.com>
Co-authored-by: Jon Tirsen <tirsen@squareup.com> Signed-off-by: Jon Tirsen <tirsen@squareup.com>
Co-authored-by: Jon Tirsen <tirsen@squareup.com> Signed-off-by: Jon Tirsen <tirsen@squareup.com>
Co-authored-by: Jon Tirsen <tirsen@squareup.com> Signed-off-by: Jon Tirsen <tirsen@squareup.com>
Co-authored-by: Jon Tirsen <tirsen@squareup.com> Signed-off-by: Jon Tirsen <tirsen@squareup.com>
Co-authored-by: Jon Tirsen <tirsen@squareup.com> Signed-off-by: Jon Tirsen <tirsen@squareup.com>
Co-authored-by: Jon Tirsen <tirsen@squareup.com> Signed-off-by: Jon Tirsen <tirsen@squareup.com>
Extract the PR identity, status, and external-link treatment so the session rail and tracker can render the same recognizable row. Co-authored-by: Jon Tirsen <tirsen@squareup.com> Signed-off-by: Jon Tirsen <tirsen@squareup.com>
Co-authored-by: Jon Tirsen <tirsen@squareup.com> Signed-off-by: Jon Tirsen <tirsen@squareup.com>
Co-authored-by: Jon Tirsen <tirsen@squareup.com> Signed-off-by: Jon Tirsen <tirsen@squareup.com>
Render tracker entries through the same presentational component as session-related pull requests while keeping tracker-specific data fetching and URL handling separate. Co-authored-by: Jon Tirsen <tirsen@squareup.com> Signed-off-by: Jon Tirsen <tirsen@squareup.com>
dca08da to
84bd48b
Compare
Dismissing the blocking state per repo-owner policy: our agent reviews post findings as comments, never as Request Changes. The findings above stand as review comments for the author to weigh.
loganj
left a comment
There was a problem hiding this comment.
Approving on the presumption that we make it -not- default-on for everyone.
Summary
Migrates squareup/berd#1089 from the archived internal repository onto the current public repository.
Stack Info: Stacked on #115.
The original implementation and commit authorship remain attributed to Lauren Kenny. Migration-specific changes resolve conflicts with the current top bar and experiment registry and move Goose state-directory resolution into the always-available
goose_configservice so public builds compile without the internal feedback feature.Related issue
block/berdduplicate found.LAWS/.Testing
just checkjust tauri-checkjust clippyOriginal PR description
Category: new-feature
User Impact: Users can track their open pull requests and review status from a resizable popover in Berd’s top bar.
Problem: Pull request status lives outside Berd, making it harder to keep track of reviews and failing checks while working in chats. The longer-term Work Status concept also needs clear, platform-specific direction before adding menu-bar surfaces.
Solution: Add an experiment-gated in-app PR tracker that groups PRs by the Berd project of the session that created them, surfaces key review/check states, and handles loading, empty, disconnected, and failure states. This PR also documents the three planned product tracks; it intentionally contains no native macOS or Windows menu-bar implementation. Those surfaces will ship in later follow-up PRs.
demo1.mov
states2.mov
Scope
File changes
docs/work-status-platform-surfaces.md
Defines the in-app, macOS, and Windows tracks and explicitly leaves native menu-bar surfaces to follow-up PRs.
src-tauri/src/commands/mod.rs
Registers the backend module used by the in-app tracker.
src-tauri/src/commands/pr_tracker.rs
Adds constrained GitHub CLI querying, secure GitHub URL opening, and project association through the originating Berd session.
src-tauri/src/lib.rs
Exposes the in-app PR tracker commands to the renderer.
src-tauri/src/services/log_export.rs
Shares Berd’s platform-aware Goose state-directory resolution with PR-to-session matching.
src/app/ui/TopBar.tsx
Adds the experiment-gated Pull Requests control to the top bar.
src/features/chat/ui/MessageTimelineScrollContainer.tsx
Moves the existing chat scrollbar behavior onto the shared scroll-intent component so the PR tracker can match it exactly.
src/features/design-system/generated/componentManifest.ts
Regenerates the design-system manifest for the new shared component.
src/features/experiments/tests/ExperimentsSettings.test.tsx
Covers the PR tracker experiment registration, default-on state, and opt-out behavior.
src/features/experiments/experimentDefinitions.ts
Registers the default-enabled PR tracker experiment.
src/features/work-status/PullRequestsPanel.tsx
Implements project-grouped PR rows, status presentation, collapsible sections, loading/empty/error designs, and dev-only state previews.
src/features/work-status/PullRequestsPopover.tsx
Provides the top-bar trigger, capped notification badge, reset-on-open default height, and vertical resizing.
src/features/work-status/WorkStatusBridge.tsx
Refreshes PR data while the experiment is enabled.
src/features/work-status/githubPullRequests.ts
Queries open authored PRs and maps GitHub review/check state into the tracker model.
src/features/work-status/statusModel.ts
Defines user-facing pull request status labels.
src/features/work-status/types.ts
Defines the in-app tracker’s typed snapshot and item contracts.
src/features/work-status/workStatusData.ts
Builds the PR-only snapshot consumed by the popover.
src/features/work-status/workStatusNative.ts
Wraps the minimal Tauri command needed to open PR URLs.
src/features/work-status/workStatusStore.ts
Stores the current PR snapshot and refresh timestamp.
src/main.tsx
Mounts the experiment-aware PR refresh bridge in the main renderer.
src/shared/i18n/locales/en/settings.json
Adds English experiment settings copy.
src/shared/i18n/locales/es/settings.json
Adds Spanish experiment settings copy.
src/shared/ui/scroll-intent-area.tsx
Extracts the subtle, intent-revealed scrollbar behavior shared with chat sessions.
src/shared/ui/sidebar-tokens.ts
Adds a shared compact row inset used by the tracker.
Update Aug 19, 19:05 CEST: Stacked the tracker on #115 and addressed the shared-row review feedback.
PullRequestListItemfor consistent repository, number, title, status, external-link, hover, and focus treatment.just check,just tauri-check,just clippy, and pre-push validation passed at84bd48bd.Generated with Codex