* fix(mitm): gate Agent Bridge DNS and Trust Cert on sudo password (#7938)
Extend the #7865 sudo gate to setup wizard DNS, Start DNS, and Trust Cert.
Start server still runs without a password but skips privileged cert/DNS
steps instead of spawning sudo -S with an empty string. Add a shared sudo
password modal on the Agent Bridge page for DNS and trust-cert actions.
Fixes#7938
* fix(mitm): use .tsx extension for MitmSudoPasswordModal hook
JSX in a .ts file broke dashboard typecheck and ESLint on CI.
* fix(mitm): skip DNS teardown on stop when sudo password missing (#7938)
stopMitm() no longer invokes removeDNSEntry with an empty password when
the server was started in skip mode. The MITM process is still killed.
* refactor(mitm): extract privileged step helpers to satisfy file-size cap
manager.ts exceeded the 800-line cap after #7938 gates. Move DNS teardown
and the shared sudo skip runner into dedicated modules; behavior unchanged.
Reject repair and Remove CA when no sudo password is supplied or cached,
instead of spawning sudo -S with an empty string. Add a password modal to
AgentBridgeMaintenanceCard and regression tests for the 400 gate.
Address PR review feedback: reject whitespace-only sudoPassword values,
avoid caching unusable passwords, extract closePasswordModal helper, and
replace the route test that invoked real sudo with pure gate assertions.
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>