Files
triggerdotdev--trigger.dev/apps/webapp/app/hooks/useCanViewLogsPage.ts
Mihai Popescu e29e1c86d9 Fix/tri 7032 logs page feedback (#2947)
##  Changes
### UI & UX
- Normalized log level display across table and detail view
- Fixed table header scroll behavior and sidebar positioning
- Improved loading state with taller segment and disabled resizing
- Added "no more logs" message with count
- Enhanced keyboard shortcuts
### Filtering & Search
- Streamlined filters: RunId and Task only (removed run filters)
- Side panel closes when filters change
- Fixed logs from previous search remaining in table
- Fixed table scroll position when changing filters
### Backend
- Added performance indexes on message and attributes
(`014_add_task_runs_v2_search_indexes.sql`)
- Added DEBUG level logging by default
- Removed internal logs from display
- Fixed ServiceValidationError forwarding to frontend
  - Removed v1 logs API support
2026-01-29 12:47:59 +02:00

17 lines
628 B
TypeScript

import { useEffect } from "react";
import { useTypedFetcher } from "remix-typedjson";
import { useOrganization } from "~/hooks/useOrganizations";
import { type loader as canViewLogsPageLoader } from "~/routes/resources.orgs.$organizationSlug.can-view-logs-page/route";
export function useCanViewLogsPage(): boolean | undefined {
const organization = useOrganization();
const fetcher = useTypedFetcher<typeof canViewLogsPageLoader>();
useEffect(() => {
const url = `/resources/orgs/${organization.slug}/can-view-logs-page`;
fetcher.load(url);
}, [organization.slug]);
return fetcher.data?.canViewLogsPage;
}