feat: add stacks dashboard page#2239
Open
niemyjski wants to merge 9 commits into
Open
Conversation
- Add getStacksQuery function for listing stacks with filtering - Create /stacks route with basic stacks list page - Support filtering by status, tags, date ranges, and custom Lucene expressions - Display stack information: title, tags, event count, first/last occurrence, status Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove complex TanStack table setup that was causing build errors - Use semantic HTML table with Tailwind styling for simplicity - Implement row selection with checkboxes and bulk actions UI - Support filter input, limit selector, and pagination controls - Display stack properties: title, tags, event count, last occurrence, status - Add loading and empty state handling Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Create StacksBulkActionsButton component for simplified bulk operations - Support mark open/fixed/snoozed/ignored/discarded and delete actions - Integrate with RemoveStackDialog and status change dialogs - Wire bulk actions into stacks page with selection tracking - All dialogs and confirmations included Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add stacks navigation item to Dashboards group - Use layers icon for visual consistency - Place between issues and event stream - Accessible from sidebar navigation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add filter query examples (status:discarded, tags:production, type:error) - Add bulk operation examples (change status, mark fixed, mark snoozed, delete) - Document filtering syntax for stacks dashboard feature - Help users understand query capabilities Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Rewrote stacks page using useFetchClient, createTable, getSharedTableOptions, and DataTable components matching the issues/sessions page patterns - Created proper table column definitions with NumberFormatter, TimeAgo, and badge components for status/tags - Created StacksDataTable component mirroring EventsDataTable - Uses existing TableStacksBulkActionsDropdownMenu (deleted the duplicate stacks-bulk-actions-button.svelte) - Moved navigation from Dashboards to Reports group - Removed broken getStacksQuery and list query key from api.svelte.ts - Uses FacetedFilter system for filtering (status, project, date, etc.) - WebSocket StackChanged event handling for real-time updates - Offset-based pagination with page size selector - Fixed organization abbreviation (never use org) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Clear persisted organization id when no organizations remain - Re-select first valid organization when persisted id is stale - Hide manage/billing links when current organization is invalid - Prevent organization settings layout from redirecting to undefined ids Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Keep impersonated organization selections from being overwritten by org sync - Refresh stacks table on non-removed StackChanged events with throttling - Correct stacks HTTP samples to match ids path-segment routes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The legacy Angular UI has separate views for different stack statuses (fixed, regressed, snoozed, ignored, discarded), but discarded stacks disappear after the retention period -- making them unrecoverable. Users need a unified view to manage all stacks regardless of retention.
Approach
Added a new
/stacksroute in the Svelte 5 app that follows the exact same patterns as the issues and sessions pages:useFetchClient()withclient.getJSON<Stack[]>()-- no custom query wrapperscreateTable(getSharedTableOptions<Stack>(...))with offset paginationStacksDataTablewrapper (mirrorsEventsDataTable), proper column definitions usingNumberFormatter,TimeAgo, and custom cell components for status badges and tagsFacetedFiltersystem withOrganizationDefaultsFacetedFilterBuilder-- supports status, project, date, and custom Lucene filtersTableStacksBulkActionsDropdownMenucomponent (not a duplicate)StackChangedWebSocket events to update/refresh the tableAdditional fixes included
/organization/undefinedKey files
src/.../routes/(app)/stacks/+page.svelte-- main page (rewritten from scratch)src/.../stacks/components/table/options.svelte.ts-- column definitionssrc/.../stacks/components/table/stacks-data-table.svelte-- table wrappersrc/.../stacks/components/table/stack-status-cell.svelte-- status badge cellsrc/.../stacks/components/table/stack-tags-cell.svelte-- tags cellsrc/.../routes/(app)/+layout.svelte-- organization selection reconciliationsrc/.../routes/(app)/(components)/layouts/sidebar-user.svelte-- hide org-only links when invalidsrc/.../routes/(app)/organization/[organizationId]/+layout.svelte-- guard invalid redirectCleanup
stacks-bulk-actions-button.svelte(was a broken duplicate of the existing dropdown menu)getStacksQuery()and the non-standardlistquery key fromapi.svelte.ts