Here's an initial take on how we could do this. We pass modules' dependency data to the browser as a setting. When a module is enabled, we also enable any modules it depends on (and any modules that that dependency depends on, etc.) and set the dependencies to disabled (so they can't be unchecked). When a module is disabled, we check its dependencies and, if they have no remaining dependent modules that are checked, reenable them so they can be unchecked if desired.
The main advantages are potentially saving some back and forth to the server and improving the visual display of dependencies.
Would we also need to change the existing messages about what dependencies are and are not enabled? I'm not sure. Maybe not, if we consider that this is about what is already saved, not what is currently being edited.
FAILED: [[SimpleTest]]: [MySQL] 23,319 pass(es), 0 fail(s), and 116 exception(es).
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch system-module-dependencies-js_1.patch.
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch system-module-dependencies-js_0.patch.