From 422d372122e1b8abf7d2b674eb6a763893252dfe Mon Sep 17 00:00:00 2001 From: TorMatzAndren Date: Tue, 9 Jun 2026 22:57:15 +0200 Subject: [PATCH] Expose candidate truth in Spooty workspace inspector --- src/frontend/src/app/app.component.html | 252 +++++++++++++--- src/frontend/src/app/app.component.ts | 281 +++++++++++++----- .../src/app/models/operations-snapshot.ts | 61 ++++ src/frontend/src/styles.scss | 56 ++++ 4 files changed, 533 insertions(+), 117 deletions(-) create mode 100644 src/frontend/src/app/models/operations-snapshot.ts diff --git a/src/frontend/src/app/app.component.html b/src/frontend/src/app/app.component.html index d72a041..fbc5216 100644 --- a/src/frontend/src/app/app.component.html +++ b/src/frontend/src/app/app.component.html @@ -4,15 +4,18 @@

Jarri Spooty

- v{{version}} + v{{ version }}

Spotify metadata → YouTube candidate scoring → Local archive

- - {{ spotifyConnected ? 'Spotify connected' : 'Spotify disconnected' }} + + {{ spotifyConnected ? "Spotify connected" : "Spotify disconnected" }}
@@ -49,7 +52,11 @@ Reset Current Tab - @@ -88,8 +95,11 @@ [class.connected]="spotifyConnected" (click)="connectSpotify()" > - - {{ spotifyConnected ? 'Spotify connected' : 'Connect Spotify' }} + + {{ spotifyConnected ? "Spotify connected" : "Connect Spotify" }}
@@ -121,7 +131,10 @@ />
-

Runtime download root: {{ archiveListing?.root || archiveDestination || 'loading...' }}

+

+ Runtime download root: + {{ archiveListing?.root || archiveDestination || "loading..." }} +

Per-run destination routing: pending backend support

@@ -135,7 +148,9 @@
Spotify - {{ spotifyConnected ? 'Connected' : 'Disconnected' }} + {{ + spotifyConnected ? "Connected" : "Disconnected" + }}
Playlists @@ -160,18 +175,31 @@

One collapsed row per playlist run.

- -
- -

No playlists

+ +

+ No playlists +

@@ -184,7 +212,10 @@ - +

No songs

@@ -193,9 +224,14 @@

Archive Browser

-

Root: {{ archiveListing?.root || 'loading...' }}

+

Root: {{ archiveListing?.root || "loading..." }}

- @@ -226,24 +262,40 @@ placeholder="Search archive" />
- +
-

No downloaded files found.

+

+ No downloaded files found. +

-
+

{{ group.folder }}

- +
{{ file.name }} {{ folderPath(file) }} @@ -256,47 +308,157 @@
- +

{{ selectedTrack.artist }} - {{ selectedTrack.name }}

Status: {{ trackStatusLabel(selectedTrack.status) }}

-
-
-
Spotify URL
-
{{ selectedTrack.spotifyUrl || 'none' }}
-
Status
-
{{ trackStatusLabel(selectedTrack.status) }}
-
Download attempts
-
{{ selectedTrack.downloadAttemptCount || 0 }}
-
Error
-
{{ selectedTrack.error || 'none' }}
-
+ +
+
Spotify URL
+
+ {{ + selectedTrack.spotifyUrl || "none" + }} +
+
Status
+
{{ trackStatusLabel(selectedTrack.status) }}
+
Download attempts
+
{{ selectedTrack.downloadAttemptCount || 0 }}
+
Error class
+
{{ errorClass(trackTruth) }}
+
Error summary
+
{{ errorSummary(trackTruth) }}
+
Error detail
+
+
+ Show backend evidence +
{{ errorDetail(trackTruth) }}
+
+ none +
+
-
- Other options -

- Selected candidate: - {{ selectedTrack.youtubeUrl }} -

-

Rejected candidates: {{ rejectedUrls(selectedTrack).length }}

- {{ url }} -

- Candidate alternatives are not persisted yet. Future scoring history will appear here. -

-
+
+ Selected candidate + +
+
URL
+
+ {{ + candidate.url + }} +
+
Title
+
{{ candidate.title || "unknown" }}
+
Author
+
{{ candidate.author || "unknown" }}
+
Score
+
{{ candidate.score ?? "unknown" }}
+
Reason
+
{{ candidate.reason || "unknown" }}
+
+
+ +

No selected candidate.

+
+ + Rejected candidates: + {{ rejectedCandidateCount(trackTruth) }} +
+
+
URL
+
+ {{ + candidate.url + }} +
+
Title
+
{{ candidate.title || "unknown" }}
+
Author
+
{{ candidate.author || "unknown" }}
+
Score
+
{{ candidate.score ?? "unknown" }}
+
Reason
+
{{ candidate.reason || "unknown" }}
+
Rejection class
+
{{ candidate.rejectionClass || "unknown" }}
+
Rejection summary
+
{{ candidate.rejectionSummary || "unknown" }}
+
Rejected at
+
{{ candidate.rejectedAt || "unknown" }}
+
+
+

+ No rejected candidates. +

+
+
+ + +
+ +

+ {{ + operationsSnapshotError || + "Waiting for backend operations truth." + }} +

+ +
+
-

Select a track row inside an expanded playlist to inspect Spotify, YouTube, retry, and error details.

+

+ Select a track row inside an expanded playlist to inspect + Spotify, YouTube, retry, and error details. +