Skip to content

DT-68: Implement frontend data loading for deployment tables#69

Merged
abdotop merged 4 commits into66-implementation-of-table-data-fetching-and-filteringfrom
68-implement-frontend-data-loading-for-deployment-tables
Oct 21, 2025
Merged

DT-68: Implement frontend data loading for deployment tables#69
abdotop merged 4 commits into66-implementation-of-table-data-fetching-and-filteringfrom
68-implement-frontend-data-loading-for-deployment-tables

Conversation

@abdotop
Copy link
Copy Markdown
Member

@abdotop abdotop commented Oct 13, 2025

No description provided.

@abdotop abdotop requested a review from Copilot October 13, 2025 09:30
@abdotop abdotop self-assigned this Oct 13, 2025
Copy link
Copy Markdown

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 implements frontend data loading for deployment tables by integrating backend API calls for schema and table data retrieval. The changes enable dynamic loading of database schemas and table contents with filtering, sorting, and search capabilities.

Key Changes:

  • Added API signal integration for fetching deployment schema and table data
  • Implemented reactive effects to trigger data fetches based on URL parameter changes
  • Enhanced UI components with improved styling, accessibility, and user feedback

Reviewed Changes

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

File Description
web/pages/DeploymentPage.tsx Core implementation of schema/table data loading with API signals, filter/sort parsing, and UI enhancements for tables and left panel
web/components/Filtre.tsx Exported parseFilters and parseSort functions for external use
api/routes.ts Changed table data endpoint from GET to POST method

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

<button
type='button'
class='btn btn-ghost btn-xs'
disabled={schema.pending !== undefined}
Copy link

Copilot AI Oct 13, 2025

Choose a reason for hiding this comment

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

The disabled condition schema.pending !== undefined is incorrect. A signal's pending property is typically a boolean, so this should be disabled={schema.pending} or disabled={!!schema.pending}.

Suggested change
disabled={schema.pending !== undefined}
disabled={!!schema.pending}

Copilot uses AI. Check for mistakes.
effect(() => {
const { dep, tab, table, tq } = url.params
if (dep && tab === 'tables') {
const tableName = table || schema.data?.tables?.[0]?.table
Copy link

Copilot AI Oct 13, 2025

Choose a reason for hiding this comment

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

The fallback to the first table may cause unintended behavior if schema.data.tables changes while a different table is selected. This could trigger unnecessary fetches. Consider checking if tableName exists before proceeding with the fetch.

Suggested change
const tableName = table || schema.data?.tables?.[0]?.table
const tables = schema.data?.tables || []
let tableName: string | undefined
if (table) {
// Only use the table if it exists in the schema
tableName = tables.find((t) => t.table === table)?.table
}
if (!tableName && tables.length > 0) {
tableName = tables[0].table
}

Copilot uses AI. Check for mistakes.
@abdotop abdotop force-pushed the 68-implement-frontend-data-loading-for-deployment-tables branch from 3489c62 to 93e0e2b Compare October 13, 2025 09:31
@abdotop abdotop force-pushed the 66-implementation-of-table-data-fetching-and-filtering branch from 51805fb to 3b86820 Compare October 13, 2025 09:42
@abdotop abdotop force-pushed the 68-implement-frontend-data-loading-for-deployment-tables branch from 93e0e2b to 8da793c Compare October 14, 2025 09:33
@abdotop abdotop force-pushed the 66-implementation-of-table-data-fetching-and-filtering branch from 3b86820 to 1dc16e2 Compare October 14, 2025 09:34
@abdotop abdotop force-pushed the 68-implement-frontend-data-loading-for-deployment-tables branch 2 times, most recently from 63f91e0 to e8ca19c Compare October 14, 2025 09:47
…ata retrieval

feat(Filtre): export parseFilters and parseSort functions for external use

feat(DeploymentPage): integrate filter and sort functionality for deployment table data
@abdotop abdotop force-pushed the 68-implement-frontend-data-loading-for-deployment-tables branch from ee8515e to b958ae2 Compare October 17, 2025 08:19
@abdotop abdotop marked this pull request as ready for review October 21, 2025 11:58
@abdotop abdotop merged commit 3bfe3c3 into 66-implementation-of-table-data-fetching-and-filtering Oct 21, 2025
2 checks passed
@abdotop abdotop deleted the 68-implement-frontend-data-loading-for-deployment-tables branch October 21, 2025 11:58
abdotop added a commit that referenced this pull request Oct 21, 2025
* feat(routes): add new endpoint for retrieving deployment table data

* docs(routes): add comment for deployments in route definitions

* feat(routes): add new endpoint for retrieving deployment table data

* docs(routes): add comment for deployments in route definitions

* feat(routes): add POST endpoint for fetching deployment table data with filtering and sorting

* feat(schema, sql): add columnsMap to DatabaseSchemaDef and update fetchTablesData to use it

* DT-68: Implement frontend data loading for deployment tables (#69)

* feat(routes): change endpoint from GET to POST for deployment table data retrieval

feat(Filtre): export parseFilters and parseSort functions for external use

feat(DeploymentPage): integrate filter and sort functionality for deployment table data

* feat(DeploymentPage): refactor data fetching and improve table display logic

* feat(DeploymentPage): refactor layout and improve component structure

* fix(DeploymentPage): correct parameter name from tq to qt for search functionality
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