Fix scan submit field mismatch, archive verified sprints, deep journey iteration 2
- Fix scan-submit.component.ts: Scanner API returns `scanId` (not `id`) and PascalCase status. Component now resolves `scanId ?? id` and normalizes status to lowercase. Scan progress tracking now works end-to-end. - Archive 3 verified sprints (001 FTUX, 007 Journey fixes, 008 Identity envelope) after fresh wipe + rebuild + behavioral verification. - Update Sprint 002 task statuses to reflect actual implementation (6/7 done). - Create Sprint 020 for remaining journey quality fixes (J-02 user ID display, J-03 feed auto-check). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -21,12 +21,15 @@ interface MetadataEntry {
|
||||
}
|
||||
|
||||
interface ScanSubmitResponse {
|
||||
id: string;
|
||||
id?: string;
|
||||
scanId?: string;
|
||||
status: string;
|
||||
location?: string;
|
||||
}
|
||||
|
||||
interface ScanStatusResponse {
|
||||
id: string;
|
||||
id?: string;
|
||||
scanId?: string;
|
||||
status: string;
|
||||
image?: string;
|
||||
startedAt?: string;
|
||||
@@ -537,9 +540,12 @@ export class ScanSubmitComponent implements OnDestroy {
|
||||
).subscribe({
|
||||
next: (response) => {
|
||||
this.submitting.set(false);
|
||||
this.scanId.set(response.id);
|
||||
this.scanStatus.set(response.status || 'queued');
|
||||
this.startPolling(response.id);
|
||||
const resolvedId = response.scanId ?? response.id ?? null;
|
||||
this.scanId.set(resolvedId);
|
||||
this.scanStatus.set(response.status?.toLowerCase() || 'queued');
|
||||
if (resolvedId) {
|
||||
this.startPolling(resolvedId);
|
||||
}
|
||||
},
|
||||
error: (err) => {
|
||||
this.submitting.set(false);
|
||||
@@ -571,10 +577,13 @@ export class ScanSubmitComponent implements OnDestroy {
|
||||
this.http.get<ScanStatusResponse>(`/api/v1/scans/${encodeURIComponent(scanId)}`)
|
||||
),
|
||||
tap((response) => {
|
||||
this.scanStatus.set(response.status);
|
||||
this.scanStatus.set(response.status?.toLowerCase() || 'queued');
|
||||
}),
|
||||
takeWhile(
|
||||
(response) => response.status !== 'completed' && response.status !== 'failed',
|
||||
(response) => {
|
||||
const s = response.status?.toLowerCase();
|
||||
return s !== 'completed' && s !== 'failed';
|
||||
},
|
||||
true,
|
||||
),
|
||||
takeUntilDestroyed(this.destroyRef),
|
||||
|
||||
Reference in New Issue
Block a user