Skip to content

[Task](shared-file-system-storage-list): Migrate shared_filesystem_storage/components/error_messages/list.jsx #1965

@hodanoori

Description

@hodanoori

Task Description

Convert ErrorMessageList from a class component to a functional TypeScript component. It renders a modal with an error log table. It uses UNSAFE_componentWillReceiveProps to call loadErrorMessagesOnce on every props update and componentDidMount for the initial load.

Acceptance Criteria

  • Test file list.test.tsx created, covering: modal renders, loading spinner shown when isFetching, empty state message shown, error message rows rendered via ErrorMessageItem, modal hides on close button click, URL is restored on modal exit, loadErrorMessagesOnce called on mount
  • All tests pass (pnpm vitest run)
  • File renamed to list.tsx with TypeScript props interface (including errorMessages, match, history, loadErrorMessagesOnce)
  • UNSAFE_componentWillReceiveProps removed — loadErrorMessagesOnce should only be called on mount via useEffect(() => { loadErrorMessagesOnce() }, [])
  • show class state replaced with useState; hide and restoreUrl converted to useCallback
  • No TypeScript errors (pnpm typecheck), no lint errors (pnpm lint)
  • Manual visual testing: modal opens showing the error log table, close button navigates back correctly

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions