Skip to content

Conversation

bastilian
Copy link
Member

@bastilian bastilian commented Sep 5, 2025

Summary by Sourcery

Refactor the Signatures table to use bastilian-tabletools by replacing the legacy SigTable with a new SignaturesTable component, complete with state management, serialisers, custom cells, and detail views.

Enhancements:

  • Introduce a new SignaturesTable component leveraging bastilian-tabletools for pagination, sorting, and filtering
  • Create custom table columns and cells (SignatureName, LastStatus, Systems, LastMatched) and a detail view component (SignatureDescription)
  • Add serialiser modules to translate table state into GraphQL query parameters
  • Wrap SignaturesTable with TableStateProvider and integrate it into the Signatures route, replacing the old SigTable

Build:

  • Add bastilian-tabletools dependency to package.json

Copy link

sourcery-ai bot commented Sep 5, 2025

Reviewer's Guide

This PR replaces the existing SigTable with a new bastilian-tabletools-based SignaturesTable, wiring in GraphQL querying, table state management, serializers, and custom cell components, and adds the required NPM dependency.

Sequence diagram for SignaturesTable data fetching and rendering

sequenceDiagram
  participant User
  participant SignaturesTableWithTableStateProvider
  participant TableStateProvider
  participant SignaturesTable
  participant ApolloClient
  participant TableToolsTable

  User->>SignaturesTableWithTableStateProvider: Render page
  SignaturesTableWithTableStateProvider->>TableStateProvider: Provide table state
  TableStateProvider->>SignaturesTable: Render with state
  SignaturesTable->>ApolloClient: useQuery(GET_SIGNATURE_TABLE)
  ApolloClient-->>SignaturesTable: Return data
  SignaturesTable->>TableToolsTable: Render table with data, columns, filters, options
  TableToolsTable-->>User: Display table
Loading

File-Level Changes

Change Details Files
Integrate bastilian-tabletools into Signatures route by replacing SigTable with SignaturesTable and wiring GraphQL query with table state provider
  • Removed SigTable import and usage in Signatures.js
  • Added SignaturesTable import and component invocation
  • Created SignaturesTable container with useSerialisedTableState and useQuery(GET_SIGNATURE_TABLE)
src/Routes/Signatures/Signatures.js
src/Routes/Signatures/components/SignaturesTable/SignaturesTable.js
Implement serializers for pagination, sorting, and filtering
  • Added paginationSerialiser calculating offset and limit
  • Added sortSerialiser mapping column index and direction
  • Added filtersSerialiser with type-based filter handlers and custom serialiser lookup
src/Routes/Signatures/components/SignaturesTable/serialisers.js
Define table configuration and custom cell/detail components
  • Created columns.js with sortable column definitions and custom components
  • Created filters.js with checkbox, text, and single-select filters
  • Built cell components (SignatureName, LastStatus, Systems, LastMatched) and detail component (SignatureDescription)
src/Routes/Signatures/components/SignaturesTable/columns.js
src/Routes/Signatures/components/SignaturesTable/filters.js
src/Routes/Signatures/components/SignaturesTable/components/cells/SignatureName.js
src/Routes/Signatures/components/SignaturesTable/components/cells/LastStatus.js
src/Routes/Signatures/components/SignaturesTable/components/cells/Systems.js
src/Routes/Signatures/components/SignaturesTable/components/cells/LastMatched.js
src/Routes/Signatures/components/SignaturesTable/components/SignatureDescription.js
src/Routes/Signatures/components/SignaturesTable/helpers.js
Add bastilian-tabletools dependency to package
  • Installed bastilian-tabletools in package.json
  • Updated package-lock.json to reflect new dependency
package.json
package-lock.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 0% with 76 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.06%. Comparing base (91e7066) to head (49994f2).

Files with missing lines Patch % Lines
...gnatures/components/SignaturesTable/serialisers.js 0.00% 24 Missing and 9 partials ⚠️
...ures/components/SignaturesTable/SignaturesTable.js 0.00% 8 Missing and 1 partial ⚠️
...ts/SignaturesTable/components/cells/LastMatched.js 0.00% 7 Missing ⚠️
...nts/SignaturesTable/components/cells/LastStatus.js 0.00% 5 Missing ⚠️
.../SignaturesTable/components/cells/SignatureName.js 0.00% 5 Missing ⚠️
...onents/SignaturesTable/components/cells/Systems.js 0.00% 5 Missing ⚠️
...s/Signatures/components/SignaturesTable/columns.js 0.00% 4 Missing ⚠️
...SignaturesTable/components/SignatureDescription.js 0.00% 3 Missing ⚠️
...s/Signatures/components/SignaturesTable/filters.js 0.00% 3 Missing ⚠️
...s/Signatures/components/SignaturesTable/helpers.js 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #318      +/-   ##
==========================================
- Coverage   55.35%   52.06%   -3.29%     
==========================================
  Files          55       65      +10     
  Lines        1205     1281      +76     
  Branches      399      429      +30     
==========================================
  Hits          667      667              
- Misses        489      555      +66     
- Partials       49       59      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants