rancher/dashboard PR 19794 (codyrancher), Show the project name in the Project Monitor detail header, fixes issue 15947. You were the requested reviewer. Reviewed 2026-11-05. Nothing is posted.
Verdict: good change, one small suggestion, nothing blocks
It does what the issue asks. The header reads Project Monitor: Default, and every other reader the PR description lists follows it. I checked each one on a running build.
It also fixes more than it says. On master, someone who can read a monitor but not its namespace loses the whole page header and gets a TypeError. The PR brings the header back.
One suggestion: the list and the legacy masthead still read projectDisplayName directly, so they miss the new fallback. Reading nameDisplay there removes code (3 lines added, 13 removed). I built and tested it.
My recommendation: post a Comment with that suggestion, and approve when it's in or Cody declines it. It only affects cases where the project can't be resolved, so approving as is would also be reasonable.
Test it yourself
Log in as the mf local admin on the PR list and pick All Namespaces. The admin's filter on this cluster is Only System Namespaces, and my runs didn't change it.
Click the Default row whose namespace is default. The header reads Project Monitor: Default. Master reads project-monitoring.
Find the pr19794-noproject row. Its Project cell is empty on the PR and on master, and shows project-monitoring on PR + fix.
Open that monitor in edit mode. The header stops at Project Monitor:, and PR + fix names it. The form below stays on Loading on every build, because the federator's ConfigMap isn't on the cluster. I removed my temporary one so it can't confuse your PR 19737 checks.
Open the pr19794-special row and click Show Configuration to see card 3.
The non-admin cases can't be replayed, because I deleted the temp user. The screenshots below are from that user.
The PR adds the fallback to nameDisplay, but the list's Project column and the legacy masthead (which edit mode also uses) read projectDisplayName, which has none. So when the project can't be resolved, they show nothing, while the new detail header correctly shows project-monitoring.
Where it shows
Changed by this PR: a real Project Member with a RoleBinding to read a monitor in another project's namespace. Master shows a link, but only because the getter throws. The PR leaves an empty cell whose link is zero pixels wide, so the page the PR just fixed can't be opened from the list.
Same on master: a monitor in a namespace that isn't in a project. The list cell is empty and the edit and ?legacy=true headers stop at Project Monitor:.
Neither is the common path. A Project Member reading a monitor in their own project gets Default everywhere, so this takes custom RBAC or a namespace outside any project.
PR, real non-admin: the third row has no linkPR + fix, same user: the third row can be opened
PR, edit mode, namespace in no project: no namePR + fix, same monitor
On PR + fix, the blank cell and blank headers are gone, and everything else matches the PR: header, drawer, delete dialog, export name, sort order, search and legacy view. The ten suites covering these files pass (62 tests), and lint is clean. PR 19737 edits other parts of the list file, so this shouldn't conflict with it.
2
The PR fixes a missing header it barely mentions
Good
The description says projectId stops throwing. What that means for a user: on master, someone who can read a monitor but not its namespace gets no title or actions on the detail page, plus a TypeError in the console. With the PR they get the normal header.
Master, real non-admin: no headerPR, same user and monitor
3
The drawer title shows HTML entities for free-text names
i18n.t() escapes its output by default, and these places then render it as plain text. A project called R&D shows as R&D in the Show Configuration title, and the two header aria-labels read the same way. It's generic: a ConfigMap with a free-text name does it on master too. This PR only adds project names to what can reach it, so I left it out of the suggested review. It could be its own small issue.
PR: Project MonitorMaster: a plain ConfigMap
Nothing here renders as HTML. <b>x</b> in a project name stays literal text in the header, the delete dialog and the list.
4
Under Explorer, the list shows its heading and Create button twice
Not this PR
Open Project Monitors from More Resources > Helm instead of Monitoring. It's the same on master, so it isn't in the suggested review.
How it was, how it is now
Case
Master
PR
PR + fix
Admin, project known
Detail header
project-monitoring
Default
Default
?legacy=true, edit, YAML edit
Default
Default
Default
Show Configuration title
project-monitoring
Default
Default
Delete dialog
project-monitoring
Default
Default
Header aria-labels
project-monitoring
Default
Default
Export As > YAML
project-monitoring.yaml
Default.yaml
Default.yaml
Project column order
Doesn't follow the names shown
Sorted by project, both directions
Same as PR
List search
Finds by project
Same
Same
Namespace in no project
Detail header, drawer, delete, export
project-monitoring
Same
Same
Edit and ?legacy=true header
No name
No name
project-monitoring
List cell
Empty
Empty
project-monitoring link
Real non-admin, Project Member of Default, RoleBindings on two registration namespaces
Own monitor, detail header
project-monitoring
Default
Default
Hidden namespace, detail header
No header, TypeError
project-monitoring
project-monitoring
Hidden namespace, list
Resource names on every row, TypeError (6 of 7 loads; 1 load showed the empty state, cause not chased)
Default, Default, empty (5 of 5)
Default, Default, project-monitoring (4 of 4)
The PR's test steps and claims, live
PR test step or claim
Live result
Apply the PR's ProjectHelmChart in default and patch its status
Done word for word. CD2 already has both CRDs and no federator, so nothing reconciled it.
Yes when the project is known. See card 1 when it isn't.
Show Configuration title and Delete dialog name the project
Yes. The dialog was cancelled, nothing deleted.
Aria-labels and the YAML download name follow
Yes:Default.yaml. The menu item is Export As, then YAML.
Project column sorting follows the project name
Yes, both directions. On master the column isn't sorted by what it shows.
No Name column: UI-created monitors are one per project
Holds. The form hard-codes the name, and prometheus-federator runs with Singleton: true ("only one HelmChart can be registered per project"). A second one from kubectl also reads Default, and the operator should reject it (read in its source, not run).
Only the legacy masthead special-cased this type
Nearly. The list also reads projectDisplayName, through its header override.
Also checked
Checked
Result
PR unit tests
3 of 3 pass. Removing the fallback fails 2, and restoring master's throw fails 1, so they test the real behaviour.
CI on 51a64e59d
Green except Branch Milestone, the known v2.17-on-master gate. The first attempt failed only manager/kontainer-drivers.spec.ts, unrelated, and passed on the automatic retry.
Every generic reader of nameDisplay
Read through them. PromptRemove's typed confirmation doesn't apply to this type, and bulk export already de-duplicates names.
namespaces getter now that projectId can be undefined
Safe from code: Namespace.projectId returns a string or null, so nothing matches undefined.
Create and clone pages
Same headers and no errors on all three builds.
Project names that collide
Two projects named zz9067-same exist on CD2. The monitor shows that name. Nothing breaks.
Not checked
A running federator. The fixtures use real registration namespaces left by an earlier install, with their real project annotations, but the status is patched by hand, as in the PR's steps.
The User Base global role. Only Admin and one Standard User.
The bulk Delete dialog. I couldn't reach its action with the new selection bar. The single-item dialog reads the same names.
An empty project list. My stub never matched the request, so I'm not counting it. The unit test covers it, and the no-project namespace takes the same code path.
Light and dark mode. No styles changed.
To post
Suggested review: Comment
For Cody, in your voice, using your usual shape: an intro line and one inline comment, with no code blocks and no preview link. Not posted.
Main comment
Works as described: the header, drawer, delete dialog and export all show the project now, and sorting follows it. It also brings back the header for someone who can read a monitor but not its namespace, which is missing on master. One small suggestion inline.
Inline on shell/models/helm.cattle.io.projecthelmchart.js:27
The list's Project column and the legacy masthead (also used by edit) still read projectDisplayName, so they miss this fallback. When the project can't be resolved, the list shows an empty cell with nothing to click, and the edit header stops at Project Monitor:. I hit both with a monitor in a namespace outside any project, and the list one with a Project Member who can read a monitor in another project's namespace. That user gets a link on master, but only because the getter throws there.
Could both read nameDisplay instead? That means dropping the value override in the list's header map and the isProjectHelmChart special case in the masthead. I tried it and the rest stays the same, including sorting, search and the legacy and edit headers, and the tests still pass.
Attach the two list screenshots from card 1, PR then with the change, as width-400 images.
Left on the clusters
I kept these so the preview links above work. They're inert because no federator is running, but your PR 19737 checks on CD2 will see 8 monitors until they're gone. The temp user, its RBAC and the temporary federator ConfigMap are already deleted.