App: dark-aware HTML views, run cards, changed/missing file notes, one card width, dense diff rows
show_html documents that declare dark support follow the app theme; others stay light. Tool description and skill docs say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -100,19 +100,42 @@ class StageCaptureSection extends StatelessWidget {
|
||||
}
|
||||
|
||||
/// One changed file: its kind, path and line counts; tapping opens its diff.
|
||||
/// [dense] draws it on one compact line (the path, then the counts), for a
|
||||
/// card that lists many files in little space.
|
||||
class ChangeFileRow extends StatelessWidget {
|
||||
const ChangeFileRow({super.key, required this.file, required this.onOpen});
|
||||
const ChangeFileRow({
|
||||
super.key,
|
||||
required this.file,
|
||||
required this.onOpen,
|
||||
this.dense = false,
|
||||
});
|
||||
|
||||
final FileChange file;
|
||||
final ValueChanged<FileChange> onOpen;
|
||||
final bool dense;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final mono = nativeDiffText(DefaultTextStyle.of(context).style);
|
||||
final leading = Icon(changeKindIcon(file.kind));
|
||||
final title = Text(file.path, style: mono);
|
||||
final subtitle = ChangeStatText(changeFileMeta(file));
|
||||
const trailing = Icon(Icons.chevron_right);
|
||||
final leading = Icon(changeKindIcon(file.kind), size: dense ? 20 : null);
|
||||
final Widget title = dense
|
||||
? Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
file.path,
|
||||
style: mono,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
ChangeStatText(changeFileMeta(file)),
|
||||
],
|
||||
)
|
||||
: Text(file.path, style: mono);
|
||||
final subtitle = dense ? null : ChangeStatText(changeFileMeta(file));
|
||||
final trailing = dense ? null : const Icon(Icons.chevron_right);
|
||||
return Semantics(
|
||||
container: true,
|
||||
button: true,
|
||||
@@ -124,6 +147,9 @@ class ChangeFileRow extends StatelessWidget {
|
||||
excludeSemantics: true,
|
||||
onTap: () => onOpen(file),
|
||||
child: ListTile(
|
||||
dense: dense,
|
||||
visualDensity: dense ? VisualDensity.compact : null,
|
||||
minLeadingWidth: dense ? 20 : null,
|
||||
leading: leading,
|
||||
title: title,
|
||||
subtitle: subtitle,
|
||||
|
||||
Reference in New Issue
Block a user