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
|
<stella-page-tabs
|
||||||
[tabs]="viewModeTabs"
|
[tabs]="viewModeTabs"
|
||||||
[activeTab]="viewMode()"
|
[activeTab]="viewMode()"
|
||||||
urlParam="tab"
|
urlParam="view"
|
||||||
(tabChange)="onTabChange($any($event))"
|
(tabChange)="onTabChange($any($event))"
|
||||||
ariaLabel="Run list views"
|
ariaLabel="Run list views"
|
||||||
>
|
>
|
||||||
@@ -714,12 +714,12 @@ export class ReleasesActivityComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.route.queryParamMap.subscribe((params) => {
|
this.route.queryParamMap.subscribe((params) => {
|
||||||
const view = (params.get('view') ?? 'timeline').toLowerCase();
|
const view = (params.get('view') ?? '').toLowerCase();
|
||||||
if (view === 'timeline' || view === 'table' || view === 'correlations' || view === 'approvals') {
|
if (view && (view === 'timeline' || view === 'table' || view === 'correlations' || view === 'approvals')) {
|
||||||
this.viewMode.set(view);
|
if (this.viewMode() !== view) {
|
||||||
if (view === 'approvals') this.loadApprovals();
|
this.viewMode.set(view);
|
||||||
} else {
|
if (view === 'approvals') this.loadApprovals();
|
||||||
this.viewMode.set('timeline');
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.get('status')) this.statusFilter.set(params.get('status')!);
|
if (params.get('status')) this.statusFilter.set(params.get('status')!);
|
||||||
|
|||||||
Reference in New Issue
Block a user