Skip to content

Comments

Implement crude new codeflow page, create mock data for it#5992

Open
dkurepa wants to merge 6 commits intodotnet:mainfrom
dkurepa:dkurepa/CodeflowPage
Open

Implement crude new codeflow page, create mock data for it#5992
dkurepa wants to merge 6 commits intodotnet:mainfrom
dkurepa:dkurepa/CodeflowPage

Conversation

@dkurepa
Copy link
Member

@dkurepa dkurepa commented Feb 19, 2026

The page currently looks like this
image
it's a crude look but it displays all info we want it to (except a link to the newest applicable build)
All further improvements will be made as a part of a different issue

Copilot AI review requested due to automatic review settings February 19, 2026 16:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new (work-in-progress) Codeflows page to the BarViz UI that renders a richer “codeflow row” view using locally-defined mock data, enabling iteration on layout/fields before wiring it to PCS.

Changes:

  • Introduces a new routable Razor page (/codeflows1) that displays codeflow subscription rows with backflow/forward-flow details.
  • Adds a mock-data generator (MockCodeflowData) to populate the new page.
  • Extends BarViz model types to represent the new page’s row/subscription/PR shapes.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.

File Description
src/ProductConstructionService/ProductConstructionService.BarViz/Pages/Codeflows1.razor New “Codeflows1” page rendering a Fluent UI data grid for codeflow rows (currently using mock data).
src/ProductConstructionService/ProductConstructionService.BarViz/Model/MockCodeflowData.cs New helper to generate mock CodeflowPage/subscription/build/PR data for the new page.
src/ProductConstructionService/ProductConstructionService.BarViz/Model/CodeflowSubscription.cs Adds new record types (CodeflowPage, CodeflowSubscriptionPageEntry, etc.) to support the new page model.

Comment on lines +49 to +53
<!--<Header>
<FluentSelect TOption="DefaultChannel"
Items="@DefaultChannels"
OptionValue="@(channel => channel.Branch)"
OptionSelected="@(c => c.Id == DefaultChannel?.Id)"
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

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

The <Header> section is commented out with an HTML comment (<!-- ... -->), but Razor still parses @... expressions inside HTML comments. Since DefaultChannels/DefaultChannel/OnDefaultChannelSelected aren’t defined in this component, this will fail to compile. Use a Razor comment (@* ... *@) or remove the block.

Copilot uses AI. Check for mistakes.
Comment on lines 34 to 36
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

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

ActivePr.CreatedDate is modeled as DateTime (no offset/kind), but the UI computes age using DateTime.UtcNow - pr.CreatedDate. This can produce incorrect ages if the value is local/unspecified. Prefer DateTimeOffset (or at least ensure UTC kind) for timestamps coming from APIs and for time-difference calculations.

Copilot uses AI. Check for mistakes.
Comment on lines 18 to 20
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

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

CodeflowPage exposes List<...> via a singularly-named property CodeflowRow, but it actually contains multiple rows/entries. Renaming to a plural (e.g., CodeflowRows/Rows) would make the API clearer and align with the data shape.

Copilot generated this review using guidance from repository custom instructions.
SubscriptionDetail? ForwardFlowSubscription,
SubscriptionDetail? BackflowSubscription);

public record SubscriptionDetail(
Copy link
Contributor

Choose a reason for hiding this comment

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

We already have something called SubscriptionDetailDialog in barviz so maybe we can give this a different name, like subscription status info, or something like that

Copy link
Member Author

Choose a reason for hiding this comment

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

maybe just SubscriptionInformation?


public record SubscriptionDetail(
Subscription Subscription,
int LastAppliedBuildStaleness,
Copy link
Contributor

Choose a reason for hiding this comment

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

Could this one have a name that also describes the units of time it represents? (eg hours, days, etc)

Copy link
Member Author

Choose a reason for hiding this comment

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

there is no unit. It's a number of builds behind

Copy link
Contributor

Choose a reason for hiding this comment

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

How about countOfNewerBuilds

Copy link
Member Author

Choose a reason for hiding this comment

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

I think I'd prefer staleness tbh. We already have this concept in the dependency graph page, and it shows the same information and is called the same

Copy link
Member Author

Choose a reason for hiding this comment

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

with that said, Maybe we should use it instead. The build model has a staleness property so we can use it. Will update the PR with it

adamzip
adamzip previously approved these changes Feb 20, 2026
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.

2 participants