Artifacts: badge counts deliverables only; debugging files as a secondary section
The Artifacts badge counted every recorded turn document (input, memory, output, session.html) while the tab lists only deliverables, so a run whose visits recorded only debugging files (the Caplens ticket runs) badged dozens of artifacts and opened to an empty tab. The badge and the header now count deliverables only; the tab stays reachable when only debugging files exist and ends with a collapsed 'Show debugging files' entry naming their count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -84,6 +84,7 @@ JsonMap probeRunDetail() => {
|
||||
'finished_at': '2026-10-20T08:31:00Z',
|
||||
'diagnostic': 'release plan accepted',
|
||||
'file_changes': _probeChanges(['docs/release-plan.md']),
|
||||
if (_debugOnly) 'artifacts': _turnArtifacts(5),
|
||||
},
|
||||
{
|
||||
'stage': 'build',
|
||||
@@ -94,12 +95,13 @@ JsonMap probeRunDetail() => {
|
||||
'started_at': '2026-10-20T08:16:00Z',
|
||||
'finished_at': '2026-10-20T08:24:00Z',
|
||||
'artifacts': [
|
||||
{
|
||||
'name': 'release-report.txt',
|
||||
'content_type': 'text/plain',
|
||||
'size_bytes': 12,
|
||||
'url': '/artifacts/7/2/release-report.txt',
|
||||
},
|
||||
if (!_debugOnly)
|
||||
{
|
||||
'name': 'release-report.txt',
|
||||
'content_type': 'text/plain',
|
||||
'size_bytes': 12,
|
||||
'url': '/artifacts/7/2/release-report.txt',
|
||||
},
|
||||
if (_htmlArtifact)
|
||||
{
|
||||
'name': 'release-dashboard.html',
|
||||
@@ -107,15 +109,7 @@ JsonMap probeRunDetail() => {
|
||||
'size_bytes': 4096,
|
||||
'url': '/artifacts/7/2/release-dashboard.html',
|
||||
},
|
||||
if (_turnFiles)
|
||||
for (final name in _turnFileNames)
|
||||
{
|
||||
'name': name,
|
||||
'content_type': 'text/markdown',
|
||||
'size_bytes': 640,
|
||||
'url': '/artifacts/7/2/',
|
||||
'group': 'debug',
|
||||
},
|
||||
if (_turnFiles) ..._turnArtifacts(2),
|
||||
],
|
||||
'file_changes': _probeChanges([
|
||||
'lib/release/train.dart',
|
||||
@@ -131,6 +125,7 @@ JsonMap probeRunDetail() => {
|
||||
'target': 'build',
|
||||
'started_at': '2026-10-20T08:12:00Z',
|
||||
'finished_at': '2026-10-20T08:14:00Z',
|
||||
if (_debugOnly) 'artifacts': _turnArtifacts(1),
|
||||
},
|
||||
..._fillerSteps(),
|
||||
],
|
||||
@@ -212,6 +207,23 @@ void _installUiReviewChats() {
|
||||
};
|
||||
}
|
||||
|
||||
/// `?debugOnly=1`: every run 7 visit records only the server-grouped debugging
|
||||
/// files and no deliverable, as the live ticket runs do, so the Artifacts badge
|
||||
/// and tab can be reviewed for a run with nothing published.
|
||||
bool _debugOnly = false;
|
||||
|
||||
/// One visit's debugging files, each at its own recorded url.
|
||||
List<JsonMap> _turnArtifacts(int sequence) => [
|
||||
for (final name in _turnFileNames)
|
||||
{
|
||||
'name': name,
|
||||
'content_type': 'text/markdown',
|
||||
'size_bytes': 640,
|
||||
'url': '/artifacts/7/$sequence/$name',
|
||||
'group': 'debug',
|
||||
},
|
||||
];
|
||||
|
||||
const List<String> _turnFileNames = [
|
||||
'input.md',
|
||||
'memory.md',
|
||||
@@ -961,6 +973,7 @@ class _FixtureSink implements WebSocketSink {
|
||||
/// `?running=1` adds an executing run 8 whose duration ticks;
|
||||
/// `?html=1` adds an HTML artifact to run 7 (`release-dashboard.html`);
|
||||
/// `?turn=1` adds run 7's debug turn files (input/memory/history/output.md);
|
||||
/// `?debugOnly=1` gives every run 7 visit only debug files, no deliverable;
|
||||
/// `?q=release` types that query into Search once its field is shown;
|
||||
/// `?perf=1` prints frame timings (tool/perf/frame_log.dart);
|
||||
/// `?hits=N`, `?chats=N` and `?graph=1` add bench data
|
||||
@@ -1028,7 +1041,8 @@ Future<void> main() async {
|
||||
_htmlArtifact = params['html'] == '1';
|
||||
_warnings = params['warnings'] == '1';
|
||||
_harnesses = params['harnesses'] == '1';
|
||||
_turnFiles = params['turn'] == '1';
|
||||
_debugOnly = params['debugOnly'] == '1';
|
||||
_turnFiles = params['turn'] == '1' || _debugOnly;
|
||||
final route = params['route'];
|
||||
final opensRoute = route != null && route.startsWith('/');
|
||||
if (opensRoute) openFixtureRoute(route);
|
||||
|
||||
Reference in New Issue
Block a user