[code-simplifier] Consolidate dashboard status label mapping and align pagination slice style#42180
Merged
pelikhan merged 2 commits intoJun 29, 2026
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Simplify merging parallel status switch statements into lookup table
[code-simplifier] Consolidate dashboard status label mapping and align pagination slice style
Jun 29, 2026
Contributor
🤖 PR Triage — §28357644191
Consolidates duplicate status→label logic in canvas app and normalises pagination slice style (+15/-23, 2 files). Code-simplifier output. Draft — no CI yet. Defer until promoted to ready.
|
This was referenced Jun 29, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request simplifies the Agentic Workflows dashboard extension by consolidating status-to-label class mapping in the canvas app and making pagination slicing style consistent across the extension.
Changes:
- Consolidated run/step status label CSS class mapping into a single typed lookup table (
LABEL_CLASS) insrc/app.ts. - Simplified queued step creation in
dispatchSelectedWorkflow()by generating steps via a mapped sequence. - Updated
paginate()inextension.mjsto use an explicitendvariable andslice(start, end)for consistency.
Show a summary per file
| File | Description |
|---|---|
| .github/extensions/agentic-workflows-dashboard/src/app.ts | Removes duplicated status-to-label branching and applies small idiomatic cleanups in the dashboard app logic. |
| .github/extensions/agentic-workflows-dashboard/extension.mjs | Aligns pagination slicing style by introducing an end variable and using slice(start, end). |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Low
Contributor
|
🎉 This pull request is included in a new release. Release: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This updates the recently added Agentic Workflows dashboard extension with targeted simplifications in protected files. It removes duplicated status-to-label logic in the canvas app and makes pagination slicing in the extension implementation consistent with existing patterns.
Status label mapping consolidation (
src/app.ts)switchblocks instatusClassandstepStatusClasswith a single typed lookup table covering bothWorkflowRunStatusandWorkflowStepStatus.Queued step creation simplification (
src/app.ts)buildStep(sequence, n, "pending")calls with a mapped sequence ([1,2,3,4].map(...)) indispatchSelectedWorkflow().Minor idiomatic cleanup (
src/app.ts)this.commandOutput.length === 0to!this.commandOutput.Pagination consistency update (
extension.mjs)endvariable inpaginate()and usedslice(start, end)for parity with the dashboard pagination style.