test(coverage): bring the backlinks panel under test; close preset gaps

The pre-push coverage gate was failing at 94.84% — below the 95% floor
even before the T-511 feature landed (the feature files sit at 97%; the
tree without them was at 94.80%). The bulk of the debt was the pql
backlinks panel: controller and view carried ~100 lines with zero
tests. Covers controller fetch/error/event-refresh/dispose and view
empty/error/group/row-navigation states, plus the T-511 stragglers a
formatter-conflicted edit dropped (presetLookupRoot) and the
env.path production default seams. Gate now passes at 95.26%.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-13 18:45:10 +02:00
co-authored by Claude Fable 5
parent f5c4826a55
commit d9d06cf98e
3 changed files with 254 additions and 0 deletions
+28
View File
@@ -189,6 +189,34 @@ void main() {
});
});
test('un-injected production seams (HOME / dir probe / process PATH) work', () async {
store = _FakeStore();
d = DaemonDispatcher();
registerEnvPathCommands(d, () => store, workspaceCwd: () => '/repo');
final set = await d.dispatch(
IpcRequest(
id: '1',
cmd: 'env.path',
args: const {
'positional': ['set', '/definitely-missing-dir'],
},
),
);
expect(set.ok, isTrue, reason: set.error?.message);
expect(set.data['missing'], ['/definitely-missing-dir'], reason: 'real Directory probe ran');
final cap = await d.dispatch(
IpcRequest(
id: '2',
cmd: 'env.path',
args: const {
'positional': ['capture'],
},
),
);
expect(cap.ok, isTrue);
expect(cap.data['processPath'], isA<String>());
});
test('no workspace / no store / unknown action error clearly', () async {
wire(cwd: null);
expect((await run(['list'])).error?.message, contains('no workspace'));