Skip to content

Conversation

thegreyfellow
Copy link

This pull request adds multi-row selection and filtering capabilities to the models table, along with corresponding UI and accessibility improvements. Users can now select individual models with checkboxes, select all models, and filter the table to show only selected models. The implementation includes new logic for managing selection state, updating the UI, and ensuring keyboard accessibility.

Selection and Filtering Functionality:

  • Added a new initializeSelection function in selection.ts to handle row selection, "select all," and filtering logic for the models table, including keyboard accessibility and UI state management.
  • Updated index.ts to import and initialize the new selection logic on page load. [1] [2]

UI and Accessibility Enhancements:

  • Modified the table rendering in render.tsx to include a checkbox column for row selection, a "select all" checkbox in the header, and a "Show Selected Only" filter button. Each row now has data attributes for provider and model IDs to support selection logic. [1] [2]
  • Updated table and button styles in index.css for the new selection column, row highlighting, checkbox appearance, and filter button, ensuring a clear and accessible UI. [1] [2]

- Add checkboxes to table rows and header for row selection
- Implement 'Show Selected Only' filter button with toggle functionality
- Add client-side JavaScript for selection state management and filtering
- Style checkboxes, selected rows, and filter button to match existing design
- Ensure accessibility with keyboard navigation and proper ARIA labels
- Disable select-all checkbox when showing only selected rows
- Enable filter button when no rows are selected
- Maintain consistent UI state and user experience
- Extract selection and filter logic from dangerouslySetInnerHTML in render.tsx
- Add packages/web/src/selection.ts with all selection/filter logic
- Import and initialize in packages/web/src/index.ts
- Remove inline script from render.tsx
- No change to UI/UX, improves maintainability and security
@Copilot Copilot AI review requested due to automatic review settings September 13, 2025 17:20
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds multi-row selection and filtering capabilities to the models table, enabling users to select individual models with checkboxes, select all models at once, and filter the table to show only selected models.

  • Implements a new selection system with checkbox UI elements and filtering functionality
  • Adds keyboard accessibility support for row selection
  • Updates table structure to include selection column and filter controls

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
packages/web/src/selection.ts New file containing core selection logic, filtering, and keyboard accessibility handlers
packages/web/src/render.tsx Adds checkbox column to table header and rows with data attributes for selection tracking
packages/web/src/index.ts Imports and initializes selection functionality on page load
packages/web/src/index.css Adds styles for checkboxes, selected rows, and filter button to match existing design

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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.

1 participant