Implement crude new codeflow page, create mock data for it#5992
Implement crude new codeflow page, create mock data for it#5992dkurepa wants to merge 6 commits intodotnet:mainfrom
Conversation
There was a problem hiding this comment.
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. |
| <!--<Header> | ||
| <FluentSelect TOption="DefaultChannel" | ||
| Items="@DefaultChannels" | ||
| OptionValue="@(channel => channel.Branch)" | ||
| OptionSelected="@(c => c.Id == DefaultChannel?.Id)" |
There was a problem hiding this comment.
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.
src/ProductConstructionService/ProductConstructionService.BarViz/Pages/Codeflows1.razor
Show resolved
Hide resolved
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
src/ProductConstructionService/ProductConstructionService.BarViz/Model/MockCodeflowData.cs
Show resolved
Hide resolved
src/ProductConstructionService/ProductConstructionService.BarViz/Model/MockCodeflowData.cs
Outdated
Show resolved
Hide resolved
src/ProductConstructionService/ProductConstructionService.BarViz/Model/MockCodeflowData.cs
Show resolved
Hide resolved
src/ProductConstructionService/ProductConstructionService.BarViz/Pages/Codeflows1.razor
Show resolved
Hide resolved
| SubscriptionDetail? ForwardFlowSubscription, | ||
| SubscriptionDetail? BackflowSubscription); | ||
|
|
||
| public record SubscriptionDetail( |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
maybe just SubscriptionInformation?
|
|
||
| public record SubscriptionDetail( | ||
| Subscription Subscription, | ||
| int LastAppliedBuildStaleness, |
There was a problem hiding this comment.
Could this one have a name that also describes the units of time it represents? (eg hours, days, etc)
There was a problem hiding this comment.
there is no unit. It's a number of builds behind
There was a problem hiding this comment.
How about countOfNewerBuilds
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
The page currently looks like this

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