use pql --with-context for ticket detail loading
test / unit + widget + golden + a11y (push) Failing after 26s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped

Replaces the N+1 parent-chain walk (one IPC call per ancestor, one
per decision ref) with a single pql ticket show --with-context call.
pql now returns ancestors and decisions arrays inline.

Updates PqlClient.ticketShow to accept withContext/withChildren flags,
removes the obsolete withDecision flag.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-04-24 10:54:17 +02:00
co-authored by Claude
parent 77c2f25eaf
commit b8c8826b9e
3 changed files with 10 additions and 32 deletions
+2 -1
View File
@@ -200,8 +200,9 @@ void registerPqlCommands(DaemonDispatcher d, PqlClient pql) {
try {
final result = await pql.ticketShow(
id,
withDecision: req.args['withDecision'] as bool? ?? false,
withContext: req.args['withContext'] as bool? ?? false,
withBlockers: req.args['withBlockers'] as bool? ?? false,
withChildren: req.args['withChildren'] as bool? ?? false,
);
return IpcResponse.ok(id: req.id, data: result);
} on PqlException catch (e) {
+4 -4
View File
@@ -8,8 +8,6 @@ library;
import 'dart:convert';
import 'dart:io';
import 'package:flutter/foundation.dart';
class PqlException implements Exception {
const PqlException(this.message, {this.exitCode = 1, this.stderr = ''});
final String message;
@@ -126,12 +124,14 @@ class PqlClient {
Future<Map<String, Object?>> ticketShow(
String id, {
bool withDecision = false,
bool withContext = false,
bool withBlockers = false,
bool withChildren = false,
}) async {
final args = ['ticket', 'show', id];
if (withDecision) args.add('--with-decision');
if (withContext) args.add('--with-context');
if (withBlockers) args.add('--with-blockers');
if (withChildren) args.add('--with-children');
return _runObject(args);
}