Video: Rename RadCam mentions to 4K Cam - #2954
Conversation
Automated PR Review — round 1Warning The change touches one file, the video store. Auto-discovered RTSP streams coming from the underwater camera are now named "4K Cam RTSP …" instead of "RadCam RTSP …", and the rule that automatically hides that camera's WebRTC feed (so the better-quality RTSP one is used instead) is widened: it used to hide any stream whose name contained "radcam", and now also hides names containing "4kcam" or "4k cam". Three local variables and three comments were renamed to match. Nothing else about how streams are discovered, stored or played changes. What still needs attention
Change map — what was established before judgingClaims (from the PR body, each checked against the code)
Failure site — not a bug fix; this is a rebrand plus a widening of an existing filter. There is no misbehaving code to locate. The one behavioural risk the change creates is in the added matcher itself, which is in the diff. Entry points
Neither changed function is dead: both walks reach a watcher and a user-triggered path. Invariants the change relies on
1. Correctness & Implementation Bugs — 1 finding1.1 — Widened substring matcher silently un-maps unrelated 4K cameras — Consequence: anyone using a WebRTC stream whose name contains "4K cam" — a generic 4K camera, not this product — has that stream vanish from their video configuration and lose any name they gave it, without being told why.
const is4kCamStreamName = (name: string): boolean => {
const n = name.toLowerCase()
return n.includes('radcam') || n.includes('4kcam') || n.includes('4k cam')
}
Two things make the widening hard to justify as written:
Suggested fix, smallest first: keep the matcher at the strings that are actually observed ( 2. Persistence & User Data — inventory, 1 findingInventory. The PR adds, reshapes and removes no persisted key. It changes which values get written into three existing ones, all vehicle-synced via
Judged: all three keys are 2.1 — Already-configured users keep the old name, with no notice and no stated decision — Consequence: on any installation where the camera was already discovered, the stream keeps showing the old brand name, so the change the PR advertises is invisible to exactly the users who have the camera today.
Not migrating is the right call — the internal name is the key that widget options and snapshot/video filenames are stored against (per AGENTS.md's video/snapshot naming rules), so rewriting it in place would break those references, and AGENTS.md treats automatic user-data migrations as a last resort. The gap is that AGENTS.md also requires the other half: "When a change to a default or to existing behavior leaves already-configured users on the old value, decide explicitly whether to carry them over or to leave them alone — and when you leave them, tell the user what changed." Neither the PR body nor the commit message states that decision; the body instead asserts the new name as if it applied everywhere (Change map, claim 1). Suggested fix: no code change to the naming logic. State in the PR body (and ideally the release notes) that existing streams keep their name and can be renamed by hand in the video configuration — the rename UI already exists ( 11. Nitpicks / Optional — 1 finding11.1 —
Sections with nothing to report (8)3. AGENTS.md Adherence — ✅ ( 4. Security — ✅ (all nine sub-checks run: the diff touches only 5. Performance — ✅ (both changed functions traced to their entry points in the Change map — the 5 s 6. UI / UX — ✅ (no dialog, overlay, teleporting Vuetify control, button, icon control or footer is added or changed, so the dialog-anatomy, 7. Code Quality & Style — ✅ ( 8. Commit Hygiene — ✅ (one commit, 9. Tests — ✅ (no test file appears in the PR's single-file change set, and no existing assertion or check was removed or weakened; the video store has no test suite in the base ref to weaken.) 10. Documentation — ✅ (nothing changes about Lite vs Standalone parity — the RTSP discovery path is already Electron-gated at Generated by Claude. This is advisory; a human reviewer must still approve. |
|
@ArturoManzoli I didn't check that, but make sure to test it against the latest release of the br-4k-cam-manager extension, to see if our pipeline that automatically creates the streams for the 4K Cam are working properly with the new values. And no need to deal with migration of existing setups. |
d18a3db to
6773f68
Compare
|
/review |
Automated PR Review — round 2Warning The change touches one file, the video store. Auto-discovered RTSP streams coming from the underwater camera are now named "4K Cam RTSP …" instead of "RadCam RTSP …", and the rule that automatically hides that camera's WebRTC feed (so the better-quality RTSP feed is used instead) was rewritten: since this round it hides a stream whose name contains "4kcam" once spaces are removed, and no longer hides one whose name says "RadCam". Three local variables and three comments were renamed to match. Nothing else about how streams are discovered, stored or played changes. What still needs attention
🙋 Decisions for a human2.1 — Existing installs keep the old "RadCam RTSP" name, with no notice and no stated decision
Ticking a box records the decision; the finding itself closes only on Since round 1 — 1 closed, 1 disputed, 1 new, comparing d18a3db → 6773f68Range:
What moved in the code: the helper
Discussion since round 1. rafaellehmkuhl's comment also asks the author to "test it against the latest release of the br-4k-cam-manager extension, to see if our pipeline that automatically creates the streams for the 4K Cam are working properly with the new values". I cannot verify that from this repository — no file in the tree emits or references a
Change map — what was established before judgingClaims (from the PR body, each checked against the code at this head)
Failure site — the PR fixes no bug; it is a rebrand plus a rewrite of an existing filter. The one behavioural regression it creates (claim 2) is inside the diff, in the added helper, and the two behaviours it replaces are at Entry points
Neither changed function is dead: both walks reach a watcher and a user-triggered path. Invariants the change relies on
1. Correctness & Implementation Bugs — 2 findings (1 carried from round 1)1.2 — Dropping the Consequence: on any vehicle whose camera still announces the old name, the low-quality stuttering feed reappears in the video list and is mapped again, so users who were protected from it before this PR are not after it. The added helper is now the only test on both auto-ignore paths: const is4kCamStreamName = (name: string): boolean => name.toLowerCase().replace(/\s/g, '').includes('4kcam')It replaces Who is affected, from the invariant walk above: any stream not already in Suggested fix: keep the old string alongside the new one — the two are not mutually exclusive, and a rebrand is precisely the case where both names are in the field at once. Better, since both brand names describe one device that already has a stable identifier: match the ONVIF 1.1 — Substring matcher silently un-maps unrelated 4K cameras — Consequence: anyone using a WebRTC stream whose name contains "4K cam" — a generic 4K camera, not this product — has that stream vanish from their video configuration and lose any name they gave it, without being told why.
const is4kCamStreamName = (name: string): boolean => name.toLowerCase().replace(/\s/g, '').includes('4kcam')Stripping whitespace before a substring test widens rather than narrows the match. Two things still make the match hard to justify as written:
Suggested fix, and it is the same one that closes 1.2: identify the device by the ONVIF source name on both paths ( 2. Persistence & User Data — inventory, 1 finding (carried from round 1, now disputed)Inventory. The PR adds, reshapes and removes no persisted key. It changes which values get written into three existing ones, all vehicle-synced via
Judged: all three keys are 2.1 — Already-configured users keep the old name, with no notice and no stated decision — Consequence: on any installation where the camera was already discovered, the stream keeps showing the old brand name, so the change the PR advertises is invisible to exactly the users who have the camera today.
Not migrating is the right call, and a maintainer has now said so explicitly in the discussion. The internal name is the key that widget options and snapshot/video filenames are stored against (per the AGENTS.md video/snapshot naming rules), so rewriting it in place would break those references, and AGENTS.md treats automatic user-data migrations as a last resort. The gap the finding is about is the other half of the same AGENTS.md rule: "When a change to a default or to existing behavior leaves already-configured users on the old value, decide explicitly whether to carry them over or to leave them alone — and when you leave them, tell the user what changed." Neither the PR body nor the commit message states the decision; the body instead asserts the new name as if it applied everywhere (Change map, claim 1). Suggested fix: no code change to the naming logic. State in the PR body (and the release notes) that existing streams keep their name and can be renamed by hand in the video configuration — the rename path already exists ( Sections with nothing to report (9)3. AGENTS.md Adherence — ✅ ( 4. Security — ✅ (all nine sub-checks run against this head: the diff touches only 5. Performance — ✅ (both changed functions traced to their entry points in the Change map — the 5 s 6. UI / UX — ✅ (no dialog, overlay, teleporting Vuetify control, button, icon control or footer is added or changed, so the dialog-anatomy, 7. Code Quality & Style — ✅ ( 8. Commit Hygiene — ✅ (still one commit, 9. Tests — ✅ (no test file appears in the PR's single-file change set, and no existing assertion or check was removed or weakened; the video store has no test suite in the base ref to weaken.) 10. Documentation — ✅ (nothing changes about Lite vs Standalone parity — the RTSP discovery path is already Electron-gated at 11. Nitpicks / Optional — ✅ (round 1's only entry, the single-letter local, is gone with the helper rewrite; nothing else in the two hunks is worth raising.) Generated by Claude. This is advisory; a human reviewer must still approve. |
6773f68 to
c10e653
Compare
|
Done:
The matcher is now Note: round 2's head was amended, so this round's diff is again the whole PR rather than an increment. |
|
/review |
📝 MINOR SUGGESTIONS (Automated PR Review — round 3)
One file changes, the video store. Auto-discovered RTSP streams coming from the underwater camera are now named "4K Cam RTSP …" instead of "RadCam RTSP …", and the rule that automatically hides that camera's stuttering WebRTC feed (so the better RTSP feed is used instead) now recognises both the old and the new brand name, but only when the name begins with one of them — so an unrelated camera called "4K Camera" is no longer swept up. Both of the major problems raised in the previous rounds are fixed, and the PR text now says that cameras already set up keep the name they were given. What is left is a corner case in the same matching rule. What still needs attention
Since round 2 — 3 closed, 1 new, comparing 6773f68 → c10e653Range:
What moved in the code: the helper was rewritten from
Discussion since round 2. ArturoManzoli left one substantive comment (link) listing the three fixes and stating that the extension names its MCM streams
Change map — what was established before judgingClaims (from the PR body, each checked against the code at this head)
Failure site — the PR fixes no bug in this repository; it is a rebrand plus a rewrite of an existing filter. The behaviour it replaces lives at Entry points
Neither changed function is dead: both walks reach a watcher and a user-triggered path. Invariants the change relies on
1. Correctness & Implementation Bugs — 1 finding1.3 — Anchoring the matcher drops the untrimmed names the base test caught — Consequence: if the camera reports its stream name with a leading space, the stuttering WebRTC feed this rule exists to hide is mapped and playable again for that user, with nothing telling them why. const is4kCamStreamName = (name: string): boolean => /^(4k cam|radcam) /.test(name.toLowerCase())The For a name that slips through, the consequence is the one the Suggested fix: test the trimmed name — 2. Persistence & User Data — inventory, no findingsInventory. The PR adds, reshapes and removes no persisted key. It changes which values get written into three existing ones, all vehicle-synced via
Judged: all three keys are Sections with nothing to report (9)3. AGENTS.md Adherence — ✅ ( 4. Security — ✅ (all nine sub-checks run against this head: the diff touches only 5. Performance — ✅ (both changed functions traced to their entry points in the Change map — the 5 s 6. UI / UX — ✅ (no dialog, overlay, teleporting Vuetify control, button, icon control or footer is added or changed, so the dialog-anatomy, 7. Code Quality & Style — ✅ ( 8. Commit Hygiene — ✅ (still one commit, 9. Tests — ✅ (no test file appears in the PR's single-file change set, and no existing assertion or check was removed or weakened; the video store has no test suite in the base ref to weaken.) 10. Documentation — ✅ (nothing changes about Lite vs Standalone parity — the RTSP discovery path is already Electron-gated at 11. Nitpicks / Optional — ✅ (round 1's single-letter local is long gone; the remaining taste question in the two hunks, Generated by Claude. This is advisory; a human reviewer must still approve. |
c10e653 to
d0c29d1
Compare
|
Done:
Mid-name occurrences stay unmatched on purpose: the extension puts the brand first, and matching it anywhere is what un-mapped unrelated cameras in 1.1. Note: folded into the same commit again, so this round's diff is once more the whole PR rather than an increment. |
|
/review |
📝 MINOR SUGGESTIONS (Automated PR Review — round 4)
One file changes, the video store. Auto-discovered RTSP streams coming from the underwater camera are now named "4K Cam RTSP …" instead of "RadCam RTSP …", and the rule that automatically hides that camera's stuttering WebRTC feed (so the better RTSP feed is used instead) recognises both the old and the new brand name, but only when the name starts with one of them — so an unrelated camera called "4K Camera" is no longer swept up. This round's only code change closes the last open correctness finding: the name is trimmed before it is matched, so a stray leading space can no longer slip a stream past the rule. What is left is the name the user actually reads, which is still the generic term. What still needs attention
Since round 3 — 1 closed, 1 new, comparing c10e653 → d0c29d1Range:
What moved in the code: exactly one call.
Discussion since round 3. Four comments, all from the PR thread, none of which I treated as evidence about the code.
Change map — what was established before judgingClaims (from the PR body, each checked against the code at this head)
Failure site — the PR fixes no bug in this repository; it is a rebrand plus a rewrite of an existing filter. The behaviour it replaces lives at Entry points
Neither changed function is dead: both walks reach a watcher and a user-triggered path. Invariants the change relies on
2. Persistence & User Data — inventory, no findingsInventory. The PR adds, reshapes and removes no persisted key. It changes which values get written into three existing ones, all vehicle-synced via
Judged: all three keys are 6. UI / UX — 1 finding6.1 — The name shown to the user is the generic term the matcher was narrowed to avoid — Consequence: an operator running the Blue Robotics camera alongside any other 4K camera sees a stream called "4K Cam RTSP 192.168.2.2 main" and cannot tell from the name which camera it belongs to. const prefix = sourceName.toLowerCase().includes('underwatercam') ? '4K Cam RTSP' : 'RTSP'
Answering the question left open there ("Wouldn't that be a problem on the prefix too?"): no, the two prefixes are independent, and only one of them is Cockpit's to choose.
Worth doing in this PR rather than after it: the prefix only names streams discovered from now on ( Suggested fix: qualify the prefix at Sections with nothing to report (9)1. Correctness & Implementation Bugs — ✅ (the one finding open at round 3 closed on the 3. AGENTS.md Adherence — ✅ ( 4. Security — ✅ (all nine sub-checks run against this head: the diff touches only 5. Performance — ✅ (both changed functions traced to their entry points in the Change map — the 5 s 7. Code Quality & Style — ✅ ( 8. Commit Hygiene — ✅ (still one commit, 9. Tests — ✅ (no test file appears in the PR's single-file change set, and no existing assertion or check was removed or weakened; the video store has no test suite in the base ref to weaken.) 10. Documentation — ✅ (nothing changes about Lite vs Standalone parity — the RTSP discovery path is already Electron-gated at 11. Nitpicks / Optional — ✅ (round 1's single-letter local is long gone; the one remaining taste question in the two hunks, Generated by Claude. This is advisory; a human reviewer must still approve. |
d0c29d1 to
2572645
Compare
|
Done:
The matcher stays on the bare brand names, as those are what the extension emits and are not ours to rename. Flagging for whoever picks this up: the exact wording is still open in Rafael's internal slack topic. If it lands on something else, it's the one string at |
|
/review |
✅ READY TO MERGE (Automated PR Review — round 5)
One file changes, the video store. RTSP streams auto-discovered from Blue Robotics' underwater camera are now named "Blue Robotics 4K Cam RTSP …" instead of "RadCam RTSP …", and the rule that automatically hides that camera's stuttering WebRTC feed (so the better RTSP feed is used instead) recognises both the old and the new brand name the camera's manager extension emits, but only at the start of the stream name — so an unrelated camera called "4K Camera" is not swept up. This round's only code change is the one string the last open finding named: the displayed prefix now says who makes the camera, so an operator with a second 4K camera on the boat can tell the two apart. Streams already discovered keep the name they were given. What still needs attentionNothing is open. All six findings raised over the life of this PR are closed. Since round 4 — 1 closed, 0 new, comparing d0c29d1 → 2572645Range:
What moved in the code: exactly one string literal.
Discussion since round 4. Two comments, both from the PR author, neither treated as evidence about the code.
Change map — what was established before judgingClaims (from the PR body, each checked against the code at this head)
Failure site — the PR fixes no bug in this repository; it is a rebrand plus a rewrite of an existing filter. The behaviour it replaces lives at Entry points
Neither changed function is dead: both walks reach a watcher and a user-triggered path. Invariants the change relies on
2. Persistence & User Data — inventory, no findingsInventory. The PR adds, reshapes and removes no persisted key. It changes which values get written into three existing ones, all vehicle-synced via
Judged: all three keys are Sections with nothing to report (10)1. Correctness & Implementation Bugs — ✅ (this round changes one string literal and no control flow, so I re-ran the matcher by hand against every name the earlier rounds named and the result is unchanged — 3. AGENTS.md Adherence — ✅ ( 4. Security — ✅ (all nine sub-checks run against this head: the diff touches only 5. Performance — ✅ (both changed functions traced to their entry points in the Change map — the 5 s 6. UI / UX — ✅ (the one finding here closed on 7. Code Quality & Style — ✅ ( 8. Commit Hygiene — ✅ (still one commit, 9. Tests — ✅ (no test file appears in the PR's single-file change set, and no existing assertion or check was removed or weakened; the video store has no test suite in the base ref to weaken.) 10. Documentation — ✅ (nothing changes about Lite vs Standalone parity — the RTSP discovery path is already Electron-gated at 11. Nitpicks / Optional — ✅ (round 1's single-letter local is long gone; the two remaining taste questions in the hunks — Generated by Claude. This is advisory; a human reviewer must still approve. |
| // 4K Cams announce themselves over ONVIF as "UnderwaterCam", which MCM hands us as the source name | ||
| const sourceName = streamInformation.value.find((info) => info.rtspSourceUrl === rtspUrl)?.sourceName ?? '' | ||
| const prefix = sourceName.toLowerCase().includes('underwatercam') ? 'RadCam RTSP' : 'RTSP' | ||
| const prefix = sourceName.toLowerCase().includes('underwatercam') ? 'Blue Robotics 4K Cam RTSP' : 'RTSP' |
There was a problem hiding this comment.
It should be "BR 4K Cam" here.
There was a problem hiding this comment.
Yes, my bad. That was not intentional.
| const feed = pathSegments.filter(Boolean).pop()?.split('?')[0] ?? '' | ||
|
|
||
| // RadCams announce themselves over ONVIF as "UnderwaterCam", which MCM hands us as the source name | ||
| // 4K Cams announce themselves over ONVIF as "UnderwaterCam", which MCM hands us as the source name |
There was a problem hiding this comment.
It should be "Blue Robotics' 4K Cams" here and on other places.
5fbbe48 to
c485957
Compare
| // 'RadCam' up to release 0.2.3 and '4K Cam' from 0.3.0 on, so both brand strings are in the field at once | ||
| const is4kCamStreamName = (name: string): boolean => /^(4k cam|radcam) /.test(name.trim().toLowerCase()) |
There was a problem hiding this comment.
We should not keep compatibility with the older RadCam name.
Renaming the methods to isBlueRobotics4kCamStreamName would also be good.
Name UnderwaterCam RTSP streams as 4K Cam, and match the manager extension's stream-name prefix for either brand when auto-ignoring its WebRTC feed, so the rebrand lands without dropping cameras that still report the old name or sweeping up unrelated 4K cameras.
c485957 to
90b20e5
Compare
Closes #2952