NEW @W-21910054@ Message sanitization - #368
Conversation
|
Git2Gus App is installed but the |
aruntyagiTutu
left a comment
There was a problem hiding this comment.
Nice fix — the core problem this solves is real: apiUnavailable/noOrgConnection previously interpolated raw exception/remediation text directly into a user-facing notification (apexGuruSkipped.apiUnavailable(message)). Since that text can originate from the backend/exception rather than a fixed set of known strings, displaying it verbatim in the UI is exactly the kind of thing "sanitization" should prevent. Replacing it with static, canned copy and routing the raw detail to logger.log() instead (visible via "Details" → log output) is the right shape. The new INVALID_SESSION/SCAN_TIMEOUT handlers correctly wire up the corresponding codes that code-analyzer-apexguru-engine's engine.ts (isInvalidSessionError/isScanTimeoutError) already emits, and the once-per-session suppression for INVALID_SESSION mirrors the existing NO_ORG_CONNECTION pattern appropriately (persistent condition) while SCAN_TIMEOUT correctly always shows (transient, matches API_UNAVAILABLE's behavior). Tests are thorough — cover the new banners, the once-vs-always suppression semantics, and the button callbacks.
One thing I'd like called out explicitly since the PR description is empty: this diff also silently removes the "Default target-org set to '{orgAlias}'. Re-run the scan to use ApexGuru." confirmation banner (orgSetSuccess) after a user picks an org from the QuickPick — that path now only logs internally, with zero user-facing feedback on success. Unlike the other changes here, orgAlias isn't attacker/backend-controlled text, so this doesn't look like it's motivated by the sanitization goal — it reads more like an unrelated UX regression that got swept in. Was dropping that toast intentional? If so, worth a line in the PR description; if not, it should probably be restored.
Minor/non-blocking: finishedScan's casing changed from "Scan complete" to "Scan Complete" — inconsistent with the sentence-case style used elsewhere in this same file (e.g. "ApexGuru analysis was skipped...").
No description provided.