Fix Deployments tab switching and approve/reject actions
Root cause: stella-page-tabs used urlParam="tab" while the component also read the "view" query param via a manual queryParamMap subscriber. When stella-page-tabs wrote ?tab=X to the URL, the subscriber re-read the stale ?view= param and reset viewMode back, causing tabs to appear frozen and approve/reject button clicks to be swallowed by the stale state. Fix: - Change stella-page-tabs urlParam from "tab" to "view" so both the component and the tab widget use the same query parameter - Guard the manual subscriber to only update viewMode if it actually differs, preventing feedback loops Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -173,7 +173,7 @@ function deriveOutcomeIcon(status: string): string {
|
||||
<stella-page-tabs
|
||||
[tabs]="viewModeTabs"
|
||||
[activeTab]="viewMode()"
|
||||
urlParam="tab"
|
||||
urlParam="view"
|
||||
(tabChange)="onTabChange($any($event))"
|
||||
ariaLabel="Run list views"
|
||||
>
|
||||
@@ -714,12 +714,12 @@ export class ReleasesActivityComponent implements OnInit, OnDestroy {
|
||||
});
|
||||
|
||||
this.route.queryParamMap.subscribe((params) => {
|
||||
const view = (params.get('view') ?? 'timeline').toLowerCase();
|
||||
if (view === 'timeline' || view === 'table' || view === 'correlations' || view === 'approvals') {
|
||||
this.viewMode.set(view);
|
||||
if (view === 'approvals') this.loadApprovals();
|
||||
} else {
|
||||
this.viewMode.set('timeline');
|
||||
const view = (params.get('view') ?? '').toLowerCase();
|
||||
if (view && (view === 'timeline' || view === 'table' || view === 'correlations' || view === 'approvals')) {
|
||||
if (this.viewMode() !== view) {
|
||||
this.viewMode.set(view);
|
||||
if (view === 'approvals') this.loadApprovals();
|
||||
}
|
||||
}
|
||||
|
||||
if (params.get('status')) this.statusFilter.set(params.get('status')!);
|
||||
|
||||
Reference in New Issue
Block a user