sweep remaining analyze infos to zero
test / unit + widget + golden + a11y (push) Failing after 35s
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
test / dart doc (lib API) (push) Failing after 1m0s

Clears the 19 misc lint hits left after the test_app print sweep
+ libc.dart suppression. By rule:

- `withOpacity(α)` → `withValues(alpha: α)` (deprecated_member_use)
  in `painter.dart:187` and `terminal_view.dart:318`.
- `Pointer.elementAt(n)` → `Pointer + n` (deprecated_member_use)
  in `native_pty.dart:306` and `session.dart:187`.
- Brace single-statement for/if bodies in `native_pty.dart`
  (×3) and `decisions_view.dart` (curly_braces_in_flow_control_
  structures).
- `IsolateClient` and `InProcessClient` constructors switched to
  `super.log` / `super.events` parameters (use_super_parameters);
  associated unused imports of `kernel/src/log.dart` and
  `kernel/src/events/bus.dart` removed in the same files.
- `InProcessClient._dispatcher` field + getter/setter pair folded
  into a single mutable public `dispatcher` field
  (unnecessary_getters_setters).
- `_buildDispatcher` local in `lib/main.dart` renamed to
  `buildDispatcher` (no_leading_underscores_for_local_identifiers).
- `_onTapDown(_)` in `terminal_view.dart` typed as
  `TapDownDetails _` (strict_top_level_inference).
- `operator []=(...)` in `circular_buffer.dart` given an explicit
  `void` return type (strict_top_level_inference).
- `CustomKeyboardListener` and `TerminalGestureDetector` callsites
  reordered so `child:` lands last (sort_child_properties_last).
- `CustomTextEdit` constructor declared `const`
  (prefer_const_constructors_in_immutables).
- `LinkedHashMap<K, V>()` in `paragraph_cache.dart` collapsed to a
  `<K, V>{}` literal (prefer_collection_literals); the now-unused
  `dart:collection` import dropped.

Project analyze: 19 → 0 issues. `make test` stays green; coverage
unchanged at 52.72%.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-05-06 23:51:46 +02:00
co-authored by Claude
parent 2d26af5934
commit 1fb4786f18
14 changed files with 141 additions and 144 deletions
+1 -3
View File
@@ -214,9 +214,7 @@ class _ClaudePaneState extends State<ClaudePane> {
final b64 = e.data['bytes_b64'];
if (b64 is String) {
_outputBuf.write(utf8.decode(base64Decode(b64), allowMalformed: true));
if (_flushTimer == null) {
_flushTimer = Timer(Duration.zero, _flushOutput);
}
_flushTimer ??= Timer(Duration.zero, _flushOutput);
}
case 'pane.exit':
setState(() => _statusLine = widget.isPrimary ? 'session exited — restart clide to retry' : 'session exited');
@@ -123,8 +123,9 @@ class _DecisionsViewState extends State<DecisionsView> {
final tokens = ClideTheme.of(context).surface;
if (_loading) return const Center(child: ClideText('Loading decisions...', muted: true));
if (_error != null) return Padding(padding: const EdgeInsets.all(12), child: ClideText(_error!, muted: true));
if (_decisions.isEmpty)
if (_decisions.isEmpty) {
return const Padding(padding: EdgeInsets.all(12), child: ClideText('No decisions found.\nRun `pql decisions sync` to index.', muted: true));
}
final lf = _filter.toLowerCase();
final hasFilter = lf.isNotEmpty;
+6 -12
View File
@@ -1,20 +1,14 @@
import 'package:clide/clide.dart';
import 'package:clide/kernel/src/ipc/client.dart';
import 'package:clide/kernel/src/events/bus.dart';
import 'package:clide/kernel/src/log.dart';
class InProcessClient extends DaemonClient {
InProcessClient({
required Logger log,
required DaemonBus events,
required DaemonDispatcher dispatcher,
}) : _dispatcher = dispatcher,
super(socketPath: '', log: log, events: events);
required super.log,
required super.events,
required this.dispatcher,
}) : super(socketPath: '');
DaemonDispatcher _dispatcher;
DaemonDispatcher get dispatcher => _dispatcher;
set dispatcher(DaemonDispatcher d) => _dispatcher = d;
DaemonDispatcher dispatcher;
int _nextReqId = 0;
@override
@@ -30,6 +24,6 @@ class InProcessClient extends DaemonClient {
Future<IpcResponse> request(String cmd, {Map<String, Object?> args = const {}}) {
final id = '${_nextReqId++}';
final req = IpcRequest(id: id, cmd: cmd, args: args);
return _dispatcher.dispatch(req);
return dispatcher.dispatch(req);
}
}
+3 -4
View File
@@ -13,16 +13,15 @@ import 'package:clide/clide.dart';
import 'package:clide/kernel/src/events/bus.dart';
import 'package:clide/kernel/src/events/types.dart';
import 'package:clide/kernel/src/ipc/client.dart';
import 'package:clide/kernel/src/log.dart';
class IsolateClient extends DaemonClient {
IsolateClient({
required Logger log,
required DaemonBus events,
required super.log,
required super.events,
required SendPort backendPort,
}) : _backendPort = backendPort,
_events = events,
super(socketPath: '', log: log, events: events);
super(socketPath: '');
final SendPort _backendPort;
final DaemonBus _events;
+3 -3
View File
@@ -73,7 +73,7 @@ Future<void> main() async {
InProcessClient? ipcClient;
DaemonBus? daemonBus;
DaemonDispatcher _buildDispatcher(DaemonBus events, Toolchain tc, Directory workRoot) {
DaemonDispatcher buildDispatcher(DaemonBus events, Toolchain tc, Directory workRoot) {
final dispatcher = DaemonDispatcher();
final eventSink = _BusEventSink(events);
final paneRegistry = PaneRegistry(events: eventSink);
@@ -101,7 +101,7 @@ Future<void> main() async {
: (log, events) {
daemonBus = events;
final workRoot = FilesService.atCwd(events: _BusEventSink(events)).root;
final dispatcher = _buildDispatcher(events, toolchain, workRoot);
final dispatcher = buildDispatcher(events, toolchain, workRoot);
ipcClient = InProcessClient(log: log, events: events, dispatcher: dispatcher);
return ipcClient!;
},
@@ -109,7 +109,7 @@ Future<void> main() async {
? null
: (path) async {
if (ipcClient == null || daemonBus == null) return;
ipcClient!.dispatcher = _buildDispatcher(daemonBus!, toolchain, Directory(path));
ipcClient!.dispatcher = buildDispatcher(daemonBus!, toolchain, Directory(path));
},
);
+10 -4
View File
@@ -216,9 +216,13 @@ class NativePty {
ffi.Pointer ws,
) {
malloc.free(shell);
for (var i = 0; i < argc; i++) malloc.free(argv[i]);
for (var i = 0; i < argc; i++) {
malloc.free(argv[i]);
}
malloc.free(argv);
for (var i = 0; i < envc; i++) malloc.free(envp[i]);
for (var i = 0; i < envc; i++) {
malloc.free(envp[i]);
}
malloc.free(envp);
malloc.free(wd);
calloc.free(fdOut);
@@ -298,12 +302,14 @@ class NativePty {
if (_dead || bytes.isEmpty) return 0;
final buf = malloc<ffi.Uint8>(bytes.length);
try {
for (var i = 0; i < bytes.length; i++) buf[i] = bytes[i];
for (var i = 0; i < bytes.length; i++) {
buf[i] = bytes[i];
}
var written = 0;
while (written < bytes.length) {
final n = _nativeWrite(
_fd,
buf.elementAt(written).cast(),
(buf + written).cast(),
bytes.length - written,
);
if (n < 0) {
+1 -1
View File
@@ -184,7 +184,7 @@ class PtySession {
while (written < bytes.length) {
final n = libc.write(
_masterFd,
buf.elementAt(written),
buf + written,
bytes.length - written,
);
if (n < 0) {
+3 -3
View File
@@ -278,12 +278,12 @@ class TerminalViewState extends State<TerminalView> {
} else if (!widget.readOnly) {
// Only listen for key input from a hardware keyboard.
child = CustomKeyboardListener(
child: child,
focusNode: _focusNode,
autofocus: widget.autofocus,
onInsert: _onInsert,
onComposing: _onComposing,
onKeyEvent: _handleKeyEvent,
child: child,
);
}
@@ -315,7 +315,7 @@ class TerminalViewState extends State<TerminalView> {
);
child = Container(
color: widget.theme.background.withOpacity(widget.backgroundOpacity),
color: widget.theme.background.withValues(alpha: widget.backgroundOpacity),
padding: widget.padding,
child: child,
);
@@ -347,7 +347,7 @@ class TerminalViewState extends State<TerminalView> {
widget.onTapUp?.call(details, offset);
}
void _onTapDown(_) {
void _onTapDown(TapDownDetails _) {
if (_controller.selection != null) {
_controller.clearSelection();
} else {
@@ -5,7 +5,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class CustomTextEdit extends StatefulWidget {
CustomTextEdit({
const CustomTextEdit({
super.key,
required this.child,
required this.onInsert,
@@ -64,7 +64,6 @@ class _TerminalGestureHandlerState extends State<TerminalGestureHandler> {
@override
Widget build(BuildContext context) {
return TerminalGestureDetector(
child: widget.child,
onTapUp: widget.onTapUp,
onSingleTapUp: onSingleTapUp,
onTapDown: onTapDown,
@@ -78,6 +77,7 @@ class _TerminalGestureHandlerState extends State<TerminalGestureHandler> {
onDragStart: onDragStart,
onDragUpdate: onDragUpdate,
onDoubleTapDown: onDoubleTapDown,
child: widget.child,
);
}
+1 -1
View File
@@ -184,7 +184,7 @@ class TerminalPainter {
var color = cellFlags & CellFlags.inverse == 0 ? resolveForegroundColor(cellData.foreground) : resolveBackgroundColor(cellData.background);
if (cellData.flags & CellFlags.faint != 0) {
color = color.withOpacity(0.5);
color = color.withValues(alpha: 0.5);
}
final style = _textStyle.toTextStyle(
+1 -2
View File
@@ -1,6 +1,5 @@
// Based on xterm.dart v4.0.0 by xuty (MIT). See LICENSE in this directory.
import 'dart:collection';
import 'dart:ui';
import 'package:flutter/widgets.dart';
@@ -8,7 +7,7 @@ import 'package:flutter/widgets.dart';
class _LruCache<K, V> {
_LruCache(this._maxSize);
final int _maxSize;
final _map = LinkedHashMap<K, V>();
final _map = <K, V>{};
V? operator [](K key) {
final value = _map.remove(key);
@@ -108,7 +108,7 @@ class IndexAwareCircularBuffer<T extends IndexedItem> {
/// Sets the element at the specified [index] in the list. Throws if the
/// index is out of bounds.
operator []=(int index, T value) {
void operator []=(int index, T value) {
RangeError.checkValueInInterval(index, 0, length - 1, 'index');
_adoptChild(index, value);
}