Skip to content

fix(UI): Name the Statuses as CONTEXT.md does - #166

Merged
mpaulosky merged 2 commits into
mainfrom
squad/152-status-names
Sep 30, 2026
Merged

mpaulosky merged 2 commits into
mainfrom
squad/152-status-names

Conversation

@mpaulosky

Copy link
Copy Markdown
Owner

Summary

First half of #152 (the ApprovedForRelease → Approved rename follows in its own PR).

The glossary names the Statuses Accepted, Watching, Upcoming, Dismissed, but the code used three sets:

  • SampleData seeded Answered, Watching, Upcoming, Dismissed.
  • The Set Status buttons, the status CSS classes, FakeStatus and Enums.Status used Answered, InWork, Watching, Dismissed, so on a seeded database the "in work" button looked up a Status that didn't exist and threw.

Now:

  • Everything uses Accepted, Watching, Upcoming, Dismissed: seed data, FakeStatus, Enums.Status (kept, since FakeStatus picks from it; members keep their positions), IssueComponent's status styles, and the Set Status buttons (ids, labels, CSS classes). site.css classes are renamed to match.
  • The seeded Status descriptions and the Create page say "issue" instead of "suggestion".

Existing data

scripts/migrations/152-rename-answered-status.js renames Answered Status records to Accepted, updates each Issue's embedded copy (IssueStatus.StatusName), and rewords seeded descriptions that still say "suggestion" (an Admin's own wording is left alone). It can safely be run more than once. Run it once per environment after this merges:

mongosh "<connection string>/<database>" scripts/migrations/152-rename-answered-status.js

Tested twice against a throwaway mongo:8 container: the first run renamed and reworded, the second changed nothing.

Testing

  • UI tests updated to the new names (18 failed before the source change); IssueTracker.UI.Tests.Unit 148, CoreBusiness 86, Services 99, PlugIns 37 passed.
  • scripts/gate.sh passed.

Refs #152

🤖 Generated with Claude Code

The glossary names the Statuses Accepted, Watching, Upcoming and
Dismissed, but the code used three different sets. The seeder created
Answered, Watching, Upcoming and Dismissed, while the Set Status
buttons, the status styles, FakeStatus and Enums.Status used Answered,
InWork, Watching and Dismissed. On a seeded database the "in work"
button looked up a Status that didn't exist and threw.

Everything now uses Accepted, Watching, Upcoming and Dismissed,
including the button ids and CSS classes. The seeded descriptions and
the Create page say "issue" instead of "suggestion".
scripts/migrations/152-rename-answered-status.js renames existing
Answered records, including each Issue's copy of its Status, and
rewords seeded descriptions. It can safely be run more than once.

Refs #152

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings September 29, 2026 23:57

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

The migration can overwrite administrator-authored descriptions, and a duplicate CSS selector overrides the intended Upcoming styling.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Aligns issue status terminology with CONTEXT.md and provides migration support for existing MongoDB data.

Changes:

  • Renames Answered/InWork to Accepted/Upcoming across UI, styles, fakes, enums, and tests.
  • Rewords “suggestion” as “issue.”
  • Adds a migration for existing status records and embedded issue statuses.
File Description
tests/​IssueTracker.UI.Tests.Unit/​Pages/​StatusesTests.cs Updates status snapshots.
tests/​IssueTracker.UI.Tests.Unit/​Pages/​IndexTests.cs Updates status-filter expectations.
tests/​IssueTracker.UI.Tests.Unit/​Pages/​DetailsTests.cs Updates buttons and status styles.
tests/​IssueTracker.UI.Tests.Unit/​Pages/​CreateTests.cs Updates issue-description text.
tests/​IssueTracker.UI.Tests.Unit/​Pages/​CommentTests.cs Updates displayed status.
tests/​IssueTracker.UI.Tests.Unit/​Components/​SetStatusComponentTests.cs Tests renamed status actions.
tests/​IssueTracker.UI.Tests.Unit/​Components/​IssueComponentTests.cs Tests renamed CSS mappings.
src/​UI/​IssueTracker.UI/​wwwroot/​css/​site.css Renames global status selectors.
src/​UI/​IssueTracker.UI/​Pages/​SampleData.razor.cs Aligns seeded statuses and descriptions.
src/​UI/​IssueTracker.UI/​Pages/​Create.razor Uses “issue” terminology.
src/​UI/​IssueTracker.UI/​Components/​SetStatusComponent.razor.css Renames button styles.
src/​UI/​IssueTracker.UI/​Components/​SetStatusComponent.razor.cs Maps renamed statuses.
src/​UI/​IssueTracker.UI/​Components/​SetStatusComponent.razor Renames status buttons.
src/​UI/​IssueTracker.UI/​Components/​IssueComponent.razor.css Renames status display styles.
src/​UI/​IssueTracker.UI/​Components/​IssueComponent.razor.cs Updates status-to-style mapping.
src/​CoreBusiness/​IssueTracker.CoreBusiness/​Enum/​Enums.cs Aligns status enum members.
src/​CoreBusiness/​IssueTracker.CoreBusiness/​BogusFakes/​FakeStatus.cs Aligns fake status data.
scripts/​migrations/​152-rename-answered-status.js Migrates stored names and descriptions.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/migrations/152-rename-answered-status.js Outdated
@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Test Results Summary

482 tests  ±0   482 ✅ ±0   19s ⏱️ +2s
  9 suites ±0     0 💤 ±0 
  9 files   ±0     0 ❌ ±0 

Results for commit 0867f26. ± Comparison against base commit f9c4fb5.

This pull request removes 10 and adds 10 tests. Note that renamed tests count towards both.
IssueTracker.UI.Components.IssueComponentTests ‑ IssueComponent_GetIssueStatusCssClass_Should_Return_ValidCss_Test(expectedStatus: "Answered", expectedCss: "issue-entry-status issue-entry-status-answered")
IssueTracker.UI.Components.IssueComponentTests ‑ IssueComponent_GetIssueStatusCssClass_Should_Return_ValidCss_Test(expectedStatus: "InWork", expectedCss: "issue-entry-status issue-entry-status-inwork")
IssueTracker.UI.Components.SetStatusComponentTests ‑ SetStatusComponent work setting the statuses(value: "#answered", expectedStatusName: "Answered")
IssueTracker.UI.Components.SetStatusComponentTests ‑ SetStatusComponent work setting the statuses(value: "#inwork", expectedStatusName: "InWork")
IssueTracker.UI.Pages.DetailsTests ‑ Update Status(statusId: "answered")
IssueTracker.UI.Pages.DetailsTests ‑ Update Status(statusId: "inwork")
IssueTracker.UI.Pages.DetailsTests ‑ Validate Status Styles(index: 0, expected: "issue-entry-status-answered")
IssueTracker.UI.Pages.DetailsTests ‑ Validate Status Styles(index: 2, expected: "issue-entry-status-inwork")
IssueTracker.UI.Pages.IndexTests ‑ Index_With_SelectingAStatus_Should_FilterTheIssues_TestAsync(index: 1, expected: "Answered")
IssueTracker.UI.Pages.IndexTests ‑ Index_With_SelectingAStatus_Should_FilterTheIssues_TestAsync(index: 3, expected: "InWork")
IssueTracker.UI.Components.IssueComponentTests ‑ IssueComponent_GetIssueStatusCssClass_Should_Return_ValidCss_Test(expectedStatus: "Accepted", expectedCss: "issue-entry-status issue-entry-status-accepted")
IssueTracker.UI.Components.IssueComponentTests ‑ IssueComponent_GetIssueStatusCssClass_Should_Return_ValidCss_Test(expectedStatus: "Upcoming", expectedCss: "issue-entry-status issue-entry-status-upcoming")
IssueTracker.UI.Components.SetStatusComponentTests ‑ SetStatusComponent work setting the statuses(value: "#accepted", expectedStatusName: "Accepted")
IssueTracker.UI.Components.SetStatusComponentTests ‑ SetStatusComponent work setting the statuses(value: "#upcoming", expectedStatusName: "Upcoming")
IssueTracker.UI.Pages.DetailsTests ‑ Update Status(statusId: "accepted")
IssueTracker.UI.Pages.DetailsTests ‑ Update Status(statusId: "upcoming")
IssueTracker.UI.Pages.DetailsTests ‑ Validate Status Styles(index: 0, expected: "issue-entry-status-accepted")
IssueTracker.UI.Pages.DetailsTests ‑ Validate Status Styles(index: 2, expected: "issue-entry-status-upcoming")
IssueTracker.UI.Pages.IndexTests ‑ Index_With_SelectingAStatus_Should_FilterTheIssues_TestAsync(index: 1, expected: "Accepted")
IssueTracker.UI.Pages.IndexTests ‑ Index_With_SelectingAStatus_Should_FilterTheIssues_TestAsync(index: 3, expected: "Upcoming")

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.40%. Comparing base (f9c4fb5) to head (0867f26).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #166   +/-   ##
=======================================
  Coverage   85.40%   85.40%           
=======================================
  Files          77       77           
  Lines        1596     1596           
  Branches      150      150           
=======================================
  Hits         1363     1363           
  Misses        189      189           
  Partials       44       44           
Files with missing lines Coverage Δ
...IssueTracker.CoreBusiness/BogusFakes/FakeStatus.cs 100.00% <100.00%> (ø)
...IssueTracker.UI/Components/IssueComponent.razor.cs 100.00% <100.00%> (ø)
...ssueTracker.UI/Components/SetStatusComponent.razor 83.33% <100.00%> (ø)
...eTracker.UI/Components/SetStatusComponent.razor.cs 90.90% <100.00%> (ø)
src/UI/IssueTracker.UI/Pages/Create.razor 66.66% <ø> (ø)

The migration replaced any description matching /suggestion/, so an
Admin's own wording that used the word was overwritten too. It now
replaces only the exact text the seeder used to write. Addresses
Copilot review on #166.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings September 30, 2026 00:03

Copilot AI 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.

Copilot review overview

🔵 Needs a closer look

The global stylesheet defines Upcoming twice, causing the later color declaration to override the renamed rule.

Review effort: Balanced
Findings: None

Resolved since last review (1)
Previously missed (1)

In code that hasn't changed since last review

Medium severity Duplicate CSS rule overrides intended Upcoming status color

src/​UI/​IssueTracker.UI/​wwwroot/​css/​site.css:502

This rename creates a second .issue-detail-status-upcoming rule (the existing one is immediately below at line 504). Because both have equal specificity, the later #835581 declaration always overrides this #fd7e14 declaration, leaving the renamed rule ineffective. Remove one block or consolidate them into a single rule with the intended Upcoming color.

.issue-detail-status-upcoming {
	background-color: #fd7e14;
	border-top-left-radius: 15px;
	border-bottom-left-radius: 15px;
}

@mpaulosky
mpaulosky merged commit ab344ad into main Sep 30, 2026
29 checks passed
@mpaulosky
mpaulosky deleted the squad/152-status-names branch September 30, 2026 00:08
mpaulosky added a commit that referenced this pull request Sep 30, 2026
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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