feat(app): section titles read as dividers; one Rendered/Raw switch per definition; schedule rows with labelled facts and a status pill

This commit is contained in:
2026-10-23 22:09:46 +01:00
parent c467872ee3
commit b44cecf35c
10 changed files with 355 additions and 77 deletions
@@ -1,3 +1,4 @@
import '../../../../ui/layout/section_heading.dart';
import 'package:flutter/cupertino.dart';
import '../../../../core/api_gateway.dart';
@@ -61,10 +62,14 @@ class CupertinoSessionList extends StatelessWidget {
return [
for (final group in groups)
CupertinoListSection.insetGrouped(
header: Text(
groups.length > 1
? '${section.title} · ${group.directory.isEmpty ? 'No directory' : group.directory}'
: section.title,
// Styled as a section divider, not as another chat row.
header: Builder(
builder: (context) => Text(
groups.length > 1
? '${section.title} · ${group.directory.isEmpty ? 'No directory' : group.directory}'
: section.title,
style: SectionHeadingStyle.of(context).title,
),
),
children: [for (final session in group.sessions) ..._row(session)],
),
@@ -1,3 +1,4 @@
import '../../../../ui/layout/section_heading.dart';
import 'package:flutter/material.dart';
import '../../../../core/api_gateway.dart';
@@ -44,7 +45,7 @@ class MaterialSessionList extends StatelessWidget {
Widget build(BuildContext context) {
return ListView(
children: [
for (final section in sections) _section(section),
for (final section in sections) _section(context, section),
if (emptyMessage != null)
ListTile(
title: Text(emptyMessage!),
@@ -59,10 +60,16 @@ class MaterialSessionList extends StatelessWidget {
);
}
Widget _section(ChatSessionSection section) {
Widget _section(BuildContext context, ChatSessionSection section) {
final groups = groupChatSessions(section.sessions);
final heading = SectionHeadingStyle.of(context);
return ExpansionTile(
title: Text(section.title),
// Styled as a section divider, not as another chat row.
title: Text(section.title, style: heading.title),
backgroundColor: heading.background.withValues(alpha: 0.35),
collapsedBackgroundColor: heading.background,
shape: Border(left: BorderSide(color: heading.accent, width: 3)),
collapsedShape: Border(left: BorderSide(color: heading.accent, width: 3)),
initiallyExpanded: true,
children: [
for (final group in groups) ...[
@@ -72,6 +79,7 @@ class MaterialSessionList extends StatelessWidget {
leading: const Icon(Icons.folder_outlined),
title: Text(
group.directory.isEmpty ? 'No directory' : group.directory,
style: heading.title.copyWith(fontWeight: FontWeight.w600),
),
),
// Material's native list separator between rows in a group, the