Skip to content

Refine desktop pull request views - #865

Merged
alexeyzimarev merged 4 commits into
mainfrom
feat/860-desktop-pr-views
Sep 10, 2026
Merged

alexeyzimarev merged 4 commits into
mainfrom
feat/860-desktop-pr-views

Conversation

@alexeyzimarev

@alexeyzimarev alexeyzimarev commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

Closes #860 — AI-2686

What & why

Make the desktop PR sidebar and reader easier to scan with compact status rows, underlined navigation, and dedicated reviewer, check, and discussion layouts. Status actions open the matching reader section, while native Markdown, thread replies, paging, and access protections remain available.

Where to look

Checks show exact counts only for a complete, recent snapshot of the current head. Repeated issue details collapse into an inline link; the sidebar is 320px wide.

Verification

  • dotnet build test/Capacitor.App.Tests.Unit/Capacitor.App.Tests.Unit.csproj --no-incremental — 0 warnings, 0 errors.
  • dotnet run --project test/Capacitor.App.Tests.Unit/Capacitor.App.Tests.Unit.csproj --no-build --no-restore — 1,660 passed on retry; initial test host exited with SIGSEGV.
  • Release publishes: desktop app and CLI native AOT — succeeded without warnings.
  • bash scripts/check-linear-ids.sh and git diff --check — passed.
  • Rendered actual Avalonia PR controls at 1200px and 740px; inspected review, check, thread, reply, description, and expired-access layouts.

@alexeyzimarev
alexeyzimarev marked this pull request as ready for review September 10, 2026 16:12
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-10T16:16:25.254734Z c536fde Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Refine desktop pull request navigation and status views

✨ Enhancement 🐞 Bug fix 🧪 Tests 🕐 40+ Minutes

Grey Divider

AI Description

• Redesigns desktop pull request views for compact, section-specific navigation.
• Adds freshness-aware statuses while preserving paging, Markdown, replies, and access masking.
• Narrows the sidebar and removes duplicated work-item identity.
Diagram

graph TD
  SRC["PR snapshots"] --> VM["Context model"] --> STATUS["Status model"] --> LABEL["Status label"]
  VM --> CARD["Sidebar card"]
  VM --> READER["PR reader"]
  WORK["Work context"] --> CARD
  STYLE["Shared styles"] --> CARD
  STYLE --> READER
  LABEL --> CARD
  LABEL --> READER
Loading
High-Level Assessment

The current approach is appropriate: centralizing semantic status projection and reusable styling keeps the sidebar and reader consistent, while section-specific templates preserve the distinct needs of checks, reviewers, and discussions. A single generic row renderer was considered but would over-generalize materially different content and interactions.

Files changed (18) +919 / -173

Enhancement (10) +497 / -114
PullRequestContextViewModel.Presentation.csProject pull request presentation and navigation state +83/-0

Project pull request presentation and navigation state

• Adds repository labels, tab selection, section-specific row collections, freshness messaging, and semantic lifecycle, review, and check statuses. Exact check counts are exposed only for complete, current-head, recently completed snapshots.

src/Capacitor.App/ViewModels/PullRequestContextViewModel.Presentation.cs

PullRequestContextViewModel.Projections.csEnrich projected rows with presentation metadata +13/-24

Enrich projected rows with presentation metadata

• Delegates check summaries to the new status projection and adds reviewer, actor, check, and row-status metadata. Presentation properties are now notified alongside existing projections.

src/Capacitor.App/ViewModels/PullRequestContextViewModel.Projections.cs

PullRequestRow.csExtend pull request rows for specialized layouts +5/-1

Extend pull request rows for specialized layouts

• Adds reviewer, actor, status, and review-request metadata plus bot, initial, and note visibility projections for compact row templates.

src/Capacitor.App/ViewModels/PullRequestRow.cs

PullRequestStatus.csIntroduce semantic pull request status model +17/-0

Introduce semantic pull request status model

• Defines shared status text, detail, severity projections, and vector icon data for lifecycle, review, and check states.

src/Capacitor.App/ViewModels/PullRequestStatus.cs

PullRequestCard.axamlRedesign the compact pull request sidebar card +55/-33

Redesign the compact pull request sidebar card

• Reworks the card around repository identity, lifecycle state, actionable check and review rows, freshness notices, and compact refresh and browser controls. The selector now appears only when multiple pull requests are available.

src/Capacitor.App/Views/PullRequestCard.axaml

PullRequestReader.axamlAdd tabbed pull request reader layouts +160/-49

Add tabbed pull request reader layouts

• Replaces flat section buttons with keyboard-accessible primary and review tabs. Adds dedicated reviewer, check, and discussion templates while retaining Markdown, thread expansion, paging, freshness, and access details.

src/Capacitor.App/Views/PullRequestReader.axaml

PullRequestStatusLabel.axamlRender reusable semantic status labels +24/-0

Render reusable semantic status labels

• Adds a reusable status control with bound vector icons, details tooltips, and success, warning, danger, and merged colors.

src/Capacitor.App/Views/PullRequestStatusLabel.axaml

PullRequestStatusLabel.axaml.csInitialize the pull request status control +7/-0

Initialize the pull request status control

• Adds the code-behind required to load the reusable Avalonia status label.

src/Capacitor.App/Views/PullRequestStatusLabel.axaml.cs

PullRequestStyles.axamlCentralize pull request visual styles +122/-0

Centralize pull request visual styles

• Defines shared themes for underlined tabs, compact buttons, status actions, rows, discussions, notes, and navigation icons.

src/Capacitor.App/Views/PullRequestStyles.axaml

WorkspaceView.axamlNarrow the sidebar and underline workspace tabs +11/-7

Narrow the sidebar and underline workspace tabs

• Changes workspace tabs from filled pills to underlined navigation and reduces the fixed work-context pane from 400 to 320 pixels.

src/Capacitor.App/Views/WorkspaceView.axaml

Bug fix (2) +74 / -47
WorkContextViewModel.Projections.csDeduplicate primary work-item identity +22/-2

Deduplicate primary work-item identity

• Derives display titles and inline-versus-separate issue presentation so repeated issue identity collapses into an action beside the work-item key.

src/Capacitor.App/ViewModels/WorkContextViewModel.Projections.cs

WorkContextView.axamlCompact and deduplicate work-context details +52/-45

Compact and deduplicate work-context details

• Simplifies work-item chrome, hides empty parts, and renders repeated primary issues as an inline browser action. Distinct issue details remain available as a separate card.

src/Capacitor.App/Views/WorkContextView.axaml

Tests (5) +346 / -12
FakePullRequestSource.csAllow section-specific fake page items +3/-2

Allow section-specific fake page items

• Adds a test seam for supplying custom pull request rows while preserving default fake section data.

test/Capacitor.App.Tests.Unit/FakePullRequestSource.cs

PullRequestPresentationTests.csCover pull request presentation behavior +204/-0

Cover pull request presentation behavior

• Adds headless Avalonia tests for navigation, keyboard tabs, compact rows, multiple-PR selection, freshness, check aggregation, hover states, and expired-access masking.

test/Capacitor.App.Tests.Unit/PullRequestPresentationTests.cs

PullRequestViewTestHost.csAdd an integrated pull request view harness +53/-0

Add an integrated pull request view harness

• Hosts the reader and 320-pixel sidebar against a shared model and fake source for deterministic headless presentation tests.

test/Capacitor.App.Tests.Unit/PullRequestViewTestHost.cs

WorkContextViewModelTests.csTest compact work-item identity presentation +74/-0

Test compact work-item identity presentation

• Verifies empty parts are hidden and primary issue identity is collapsed without losing its browser action or unique title.

test/Capacitor.App.Tests.Unit/WorkContextViewModelTests.cs

WorkspaceViewSmokeTests.csVerify the 320-pixel workspace sidebar +12/-10

Verify the 320-pixel workspace sidebar

• Updates the workspace sizing smoke test and teardown handling for the narrower fixed pane.

test/Capacitor.App.Tests.Unit/WorkspaceViewSmokeTests.cs

Other (1) +2 / -0
App.axamlRegister pull request styling resources +2/-0

Register pull request styling resources

• Adds a dim danger brush and loads the shared pull request style dictionary application-wide.

src/Capacitor.App/App.axaml

@qodo-code-review

qodo-code-review Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (1) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. New view model split breaks naming 📘 Rule violation ⚙ Maintainability
Description
PullRequestContextViewModel.Presentation.cs declares PullRequestContextViewModel as its sole
top-level type instead of naming the file exactly after that type. Because the new partial file adds
.Presentation to the type name, file-based navigation and later changes must account for another
exception to the repository's one-type naming convention.
Code

src/Capacitor.App/ViewModels/PullRequestContextViewModel.Presentation.cs[7]

+public sealed partial class PullRequestContextViewModel {
Relevance

●● Moderate

Recent rule enforcement supports naming concerns, but partial-class file suffixes may be an accepted
documented exception.

PR-#817

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Compliance rule 3162234 requires each source file's name to exactly match its primary top-level
type. The added file is named PullRequestContextViewModel.Presentation.cs, while its primary and
only top-level declaration is PullRequestContextViewModel.

Rule 3162234: One primary type per file, with only narrow documented exceptions
src/Capacitor.App/ViewModels/PullRequestContextViewModel.Presentation.cs[7-7]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The new presentation partial declares `PullRequestContextViewModel` in a file whose name does not exactly match the primary type.

## Fix Focus Areas
- src/Capacitor.App/ViewModels/PullRequestContextViewModel.Presentation.cs[1-83]

## Recommended Fix
Move the presentation members into `PullRequestContextViewModel.cs` so the file containing the primary declaration is named exactly after the type, then remove the mismatched partial file.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
✅ Compliance rules (platform): 64 rules
✅ Cross-repo context — repo relationships
Review mode: 🧠 Deep: This is a broad, behavior-changing desktop UI and view-model redesign spanning multiple independent navigation, status, access-control, data-projection, layout, and rendering paths, creating substantial opportunity for subtle defects beyond a single review pass.

Grey Divider

Tip of the day
💡 Did you know, you can turn these tips off under Display preferences

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo


namespace Capacitor.App.ViewModels;

public sealed partial class PullRequestContextViewModel {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

1. New view model split breaks naming 📘 Rule violation ⚙ Maintainability

PullRequestContextViewModel.Presentation.cs declares PullRequestContextViewModel as its sole
top-level type instead of naming the file exactly after that type. Because the new partial file adds
.Presentation to the type name, file-based navigation and later changes must account for another
exception to the repository's one-type naming convention.
Agent Prompt
## Issue description
The new presentation partial declares `PullRequestContextViewModel` in a file whose name does not exactly match the primary type.

## Fix Focus Areas
- src/Capacitor.App/ViewModels/PullRequestContextViewModel.Presentation.cs[1-83]

## Recommended Fix
Move the presentation members into `PullRequestContextViewModel.cs` so the file containing the primary declaration is named exactly after the type, then remove the mismatched partial file.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve desktop pull request sidebar and reader layout

1 participant