Skip to content

feat(#6315): integrate Issues into Repository (4/4) - #26

Open
Defmon3 wants to merge 1 commit into
stack/6315-series-repositoryfrom
stack/6315-series-issues
Open

Defmon3 wants to merge 1 commit into
stack/6315-series-repositoryfrom
stack/6315-series-issues

Conversation

@Defmon3

@Defmon3 Defmon3 commented Sep 18, 2026

Copy link
Copy Markdown
Owner

Series and review order

Part Review Base
1 Server API Bilal's feat/issues-page
2 History client Part 1
3 Repository pane Part 2
4 Issues integration Part 3

These are open review units for one proposal, stacked on pingdotgg/t3code#6315. Part 1 targets Bilal's fork; parts 2–4 target the preceding branch in our fork. The complete series is available at the final branch. The series is open for review; feedback on product direction and implementation is welcome.

Short demo: History paging, Pull Requests, Issues, and retained History state.

Prior discussion: the original proposal and Bilal's invitation to stack it. This records the invitation, not upstream acceptance of the design.

What changed

Adds Bilal's Issues view to Repository and shares saved filters with the full Issues page. Search text stays temporary and exact as typed; a shared helper trims and caps the value sent to the host at the existing 200-character limit.

Why

Users can move between History, Issues and Pull Requests in the same repository context without replacing the full-page workflows.

Dependency and review

Part 4 of 4, based on stack/6315-series-repository. Review only this incremental Issues integration. This review PR lives in our fork because that is where the preceding branch exists.

Verification

This exact cumulative layer passed dev-server checks on both Issues screens: 250 raw characters yielded a 200-character query; whitespace-only input omitted the query; spaced search text was trimmed for the request. Closed/Open filters carried between panel and page. Search text reset on panel remount. Real issue rows rendered and no page exceptions were captured.

The shared-helper change passed 19 focused tests, web typecheck and scoped lint with existing React warnings. These do not constitute verification of every tracker provider or connection mode.

UI

Before: Repository contains History and Pull Requests.
Repository before Issues

After: Issues joins the Repository tabs.
Repository Issues

The full page remains available:
Full Issues page

The original proposal's images and discussion are preserved. The standalone general fixes are not included.

Developed with Astra 6 in Codex/T3 Code and reviewed with Fable 5.1.

Summary by Sourcery

Integrate Issues into the Repository panel and share its saved filtering experience with the full Issues page.

New Features:

  • Add an Issues tab to the Repository panel for browsing, filtering, opening, updating, and handing off project issues alongside History and Pull Requests.

Bug Fixes:

  • Normalize issue search input consistently by trimming whitespace, omitting empty queries, and enforcing the existing 200-character limit.

Enhancements:

  • Share issue filter and sort preferences between the Repository Issues panel and the full Issues page while keeping search text temporary.
  • Migrate legacy standalone Issues panel state into the unified Repository surface while preserving selections and panel placement.

Documentation:

  • Document Issues browsing within the Repository panel and explain which preferences persist.

Tests:

  • Add coverage for issue preference persistence, search normalization, Repository navigation, and right-panel state migration.

Chores:

  • Remove the standalone Issues surface and its separate right-panel entry in favor of Repository integration.

@sourcery-ai

sourcery-ai Bot commented Sep 18, 2026

Copy link
Copy Markdown

Reviewer's Guide

The PR completes Issues integration by consolidating the standalone Issues surface into a lazy-loaded Repository tab, migrating persisted panel state, sharing validated project-scoped filters with the full Issues page, and normalizing search requests to the 200-character host limit.

Sequence diagram for normalized Issues search requests

sequenceDiagram
    actor User
    participant IssuesView
    participant normalizeIssueSearchQuery
    participant useDebouncedValue
    participant IssueListHost

    User->>IssuesView: enter search text
    IssuesView->>normalizeIssueSearchQuery: normalizeIssueSearchQuery(query)
    normalizeIssueSearchQuery-->>IssuesView: trimmed query capped at 200 characters
    IssuesView->>useDebouncedValue: useDebouncedValue(searchQuery, 250)
    useDebouncedValue-->>IssuesView: debounced query
    IssuesView->>IssueListHost: list({query: debounced query})
    alt whitespace-only query
        IssuesView->>IssueListHost: list({query omitted})
    end
Loading

State diagram for Repository issue selection and panel migration

stateDiagram-v2
    [*] --> Repository
    Repository --> RepositoryIssues: selectRepositoryView(issues)
    RepositoryIssues --> RepositoryIssues: selectRepositoryIssue(target)
    RepositoryIssues --> IssueDetail: open selected issue
    IssueDetail --> RepositoryIssues: return to list
    RepositoryIssues --> RepositoryHistory: selectRepositoryView(history)
    RepositoryIssues --> RepositoryPullRequests: selectRepositoryView(pull-requests)
    LegacyIssues --> RepositoryIssues: migratePersistedRightPanelState
    RepositoryHistory --> RepositoryIssues: selectRepositoryView(issues)
    RepositoryPullRequests --> RepositoryIssues: selectRepositoryView(issues)
Loading

Flow diagram for shared issue filter preferences

flowchart LR
    FilterChange[Change state, involvement, label, sort, or order] --> issuePanelPreferencePatch
    issuePanelPreferencePatch --> Preferences[(Environment and project storage key)]
    Preferences --> resolveIssuePanelPreferences
    resolveIssuePanelPreferences --> IssuesPanel
    resolveIssuePanelPreferences --> IssuesPage
    SearchChange[Change search text] --> TemporaryQuery[Temporary route or component state]
    TemporaryQuery --> IssueListHost
Loading

File-Level Changes

Change Details Files
Integrate the Issues browser as a Repository tab and route issue selection through the repository surface.
  • Add History, Issues, and Pull Requests tabs with lazy-loaded Issues content and keyboard navigation.
  • Replace standalone Issues panel creation and surface handling with Repository view selection.
  • Preserve selected issue state while switching repository views and pass issue handoff/detail callbacks through ChatView.
  • Update right-panel availability, empty-state copy, icons, and titles to reflect the consolidated Repository surface.
apps/web/src/components/ChatView.tsx
apps/web/src/components/RepositoryPanel.tsx
apps/web/src/components/RightPanelTabs.tsx
apps/web/src/rightPanelStore.ts
Migrate persisted right-panel state and tests from the standalone Issues surface to Repository Issues state.
  • Bump persistence schema to v15 and merge legacy Issues surfaces into Repository while retaining their position and selection.
  • Validate and normalize persisted issue selections and preserve selections when Repository is reopened or proactively changed.
  • Revise store, panel navigation, and tab tests for the consolidated surface.
apps/web/src/rightPanelStore.ts
apps/web/src/rightPanelStore.test.ts
apps/web/src/components/RepositoryPanel.test.tsx
apps/web/src/components/RightPanelTabs.test.tsx
Share project-scoped issue filters between the full Issues page and Repository Issues.
  • Persist state, involvement, label, sort, and order per environment/project using validated local-storage preferences.
  • Hydrate missing route filters from saved preferences while allowing explicit route values to override them.
  • Keep search text URL/local state temporary and exclude query, project, and host changes from saved preferences.
apps/web/src/components/issue/IssuesPanel.tsx
apps/web/src/components/issue/issuePanelPreferences.ts
apps/web/src/components/issue/issuePanelPreferences.test.ts
apps/web/src/routes/_chat.issues.tsx
apps/web/src/routes/-chatIssuesTitlebar.test.tsx
Normalize issue search input consistently before issuing host queries.
  • Trim whitespace and cap search queries at the existing 200-character contract limit on both issue surfaces.
  • Treat whitespace-only searches as absent and use normalized values for debounce, local filtering, loading state, and ranking.
  • Add focused coverage for query bounds, omitted queries, preference serialization, and corrupt stored preferences.
apps/web/src/components/issue/IssuesPanel.tsx
apps/web/src/components/issue/issuePanelPreferences.ts
apps/web/src/components/issue/issuePanelPreferences.test.ts
apps/web/src/routes/_chat.issues.tsx
Document the consolidated repository workflow and issue preference behavior.
  • Describe Issues alongside History and Pull Requests in the Repository documentation.
  • Document per-project/environment filter persistence and temporary search behavior.
docs/user/source-control.md

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="apps/web/src/rightPanelStore.ts" line_range="599-610" />
<code_context>
+                  : rawActiveSurfaceId === "git-history"
+                    ? "history"
+                    : persistedRepositoryView;
+            const issueSelectionSource =
+              (persistedIssues?.kind === "issues" ? persistedIssues.selected : undefined) ??
+              (persistedRepository?.kind === "repository"
+                ? persistedRepository.selectedIssue
+                : undefined);
+            const repositorySurface: RightPanelSurface = {
+              id: "repository",
+              kind: "repository",
+              view: repositoryView,
+              ...(persistedIssues !== undefined || issueSelectionSource !== undefined
+                ? { selectedIssue: normalizeIssueSelection(issueSelectionSource) }
+                : {}),
+            };
             let repositoryIncluded = false;
</code_context>
<issue_to_address>
**issue (broader_impact):** A malformed legacy Issues selection takes precedence over a valid repository `selectedIssue`: the nullish coalescing expression selects the malformed object, `normalizeIssueSelection` converts it to null, and the valid repository selection is discarded during migration.

**Triggers:** When persisted state contains both a legacy `issues` surface with a non-null malformed `selected` value and a repository surface with a valid `selectedIssue`.

**Suggested fix:** Decode each candidate before applying precedence, and fall back to the repository selection when the legacy selection fails `decodePersistedIssueSelection`.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment on lines +599 to +610
const issueSelectionSource =
(persistedIssues?.kind === "issues" ? persistedIssues.selected : undefined) ??
(persistedRepository?.kind === "repository"
? persistedRepository.selectedIssue
: undefined);
const repositorySurface: RightPanelSurface = {
id: "repository",
kind: "repository",
view: repositoryView,
...(persistedIssues !== undefined || issueSelectionSource !== undefined
? { selectedIssue: normalizeIssueSelection(issueSelectionSource) }
: {}),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (broader_impact): A malformed legacy Issues selection takes precedence over a valid repository selectedIssue: the nullish coalescing expression selects the malformed object, normalizeIssueSelection converts it to null, and the valid repository selection is discarded during migration.

Triggers: When persisted state contains both a legacy issues surface with a non-null malformed selected value and a repository surface with a valid selectedIssue.

Suggested fix: Decode each candidate before applying precedence, and fall back to the repository selection when the legacy selection fails decodePersistedIssueSelection.

@Defmon3
Defmon3 force-pushed the stack/6315-series-issues branch from 823c2ff to 6b1c526 Compare September 21, 2026 22:35
@Defmon3
Defmon3 force-pushed the stack/6315-series-repository branch from c4256db to 98c657c Compare September 21, 2026 22:35
@Defmon3
Defmon3 force-pushed the stack/6315-series-issues branch from 6b1c526 to 7096f90 Compare September 21, 2026 22:51
@Defmon3
Defmon3 force-pushed the stack/6315-series-repository branch from 98c657c to 0de5387 Compare September 21, 2026 22:51

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL Estimated size XL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant