Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions frontend/ai.client/src/app/agents/detail/agent-detail.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
computed,
inject,
input,
OnInit,
signal,
} from '@angular/core';
import { Router } from '@angular/router';
Expand Down Expand Up @@ -358,7 +359,7 @@ import { TooltipDirective } from '../../components/tooltip/tooltip.directive';
</div>
`,
})
export class AgentDetailPage {
export class AgentDetailPage implements OnInit {
private api = inject(AgentApiService);
private pinService = inject(AgentPinService);
private router = inject(Router);
Expand Down Expand Up @@ -392,7 +393,14 @@ export class AgentDetailPage {
readonly reportConfirmation = signal<string | null>(null);
private readonly hasOpenReport = signal(false);

constructor() {
/**
* ``ngOnInit``, not the constructor: ``id`` is a required signal input bound by
* ``withComponentInputBinding()``, and the router sets it *after* construction.
* Reading it a moment too early throws NG0950, which ``load()``'s own try/catch
* then swallowed into "Failed to load this agent." — an error banner with no
* network request behind it, which is what this page did from phase 3 until now.
*/
ngOnInit(): void {
void this.load();
// Cached across the session, so arriving from a shelf row costs nothing.
void this.pinService.load();
Expand Down