Skip to content

🎯 Auto PR: stage → main#121

Merged
husamql3 merged 6 commits intomainfrom
stage
Feb 20, 2026
Merged

🎯 Auto PR: stage → main#121
husamql3 merged 6 commits intomainfrom
stage

Conversation

@husamql3
Copy link
Owner

@husamql3 husamql3 commented Feb 17, 2026

This PR was automatically updated from the stage branch.

Triggered by push to stage: Added preset row count options to the table footer (resolves #38)

Commit: 0831490

Summary by CodeRabbit

  • New Features

    • Added confirmation dialog for record deletion operations
    • Added tooltips to primary key and foreign key column indicators
    • Added preset row count options in table footer for pagination control
  • Documentation

    • Updated changelog and roadmap with feature improvements and progress tracking

@coderabbitai
Copy link

coderabbitai bot commented Feb 17, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Adds a confirmation AlertDialog for record deletion in the table tab, moves delete to a two-step flow, adds tooltips for PK/FK icons, updates preset row-count UI and constant, bumps server version and changelog, and updates several public site assets and roadmap entries.

Changes

Cohort / File(s) Summary
Delete confirmation (records)
packages/core/src/components/table-tab/header/delete-btn.tsx
Replaces immediate delete with a two-step flow: click opens AlertDialog, confirmation triggers deletion; adds dialog state and handlers, preserves forced-delete fallback on error.
Column UI & delete API
packages/core/src/components/table-tab/table-head-row.tsx, packages/core/.../use-delete-column
Wraps PK/FK icons with Tooltip components and layout tweaks; deleteColumn signature now accepts db: string (passes activeTableName).
Rows-per-page UI & preset sizes
packages/core/src/components/table-tab/table-footer.tsx, packages/core/src/utils/constants/index.ts
Replaces Select with numeric input + preset dropdown, sync logic and validation added; new exported PRESET_SIZES array introduced.
Server version & changelog
packages/server/package.json, www/src/lib/content/changelog.ts
Bumps server package version to 1.3.33 and adds changelog entry mentioning delete confirmation, PK/FK tooltips, and preset row counts.
Public site assets
www/public/llms.txt, www/public/robots.txt, www/public/sitemap.xml
Adds llms.txt; updates robots.txt crawler entries; updates sitemap.xml with new routes and lastmod dates.
Roadmap & UI polish
www/src/lib/content/roadmap.ts, www/src/routes/(main)/_pathlessLayout/changelog.tsx
Updates roadmap item statuses (several moved to completed/in-progress); small visual styling change to changelog version badge (shadow classes).

Sequence Diagram

sequenceDiagram
    participant User
    participant DeleteBtn
    participant AlertDialog
    participant DeleteHandler
    participant ForcedDeleteDialog

    User->>DeleteBtn: Click delete button
    DeleteBtn->>AlertDialog: Open confirmation dialog (title/description based on selection)
    AlertDialog->>User: Show Cancel / Delete actions
    User->>AlertDialog: Click Delete
    AlertDialog->>DeleteBtn: Trigger handleConfirmDelete
    DeleteBtn->>DeleteHandler: Execute deletion request
    alt Deletion succeeds
        DeleteHandler->>DeleteBtn: Return success
        DeleteBtn->>AlertDialog: Close dialog, refresh UI
    else Deletion fails (related records)
        DeleteHandler->>DeleteBtn: Return error
        DeleteBtn->>ForcedDeleteDialog: Open forced-delete dialog (fallback)
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes several out-of-scope changes: tooltip additions for PK/FK columns, changelog/roadmap updates, llms.txt addition, and robots.txt modifications not related to issue #86. Consider separating the confirmation dialog implementation from unrelated changes like tooltips, documentation updates, and SEO files into separate pull requests.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is vague and generic, using a template-like format that doesn't convey meaningful information about the actual changes. Replace with a descriptive title that summarizes the main changes, such as 'Add confirmation dialog for unconstrained record deletion' or similar.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed The pull request implements a confirmation dialog for record deletion as required by issue #86, addressing the core requirement to show a modal confirming deletion operations.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch stage

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
www/src/lib/content/changelog.ts (1)

19-55: ⚠️ Potential issue | 🟡 Minor

Changelog entry title and date were not updated for 1.3.31.

The version was bumped from 1.3.30 to 1.3.31, and a new improvement was added, but the title (Line 21: "Add table actions menu") and date (Line 20: "2026-02-15") still reflect the previous release. If 1.3.31 is a distinct release, consider updating the title to something like "Add confirmation dialog for delete record" and setting the date to today's date, or splitting this into a separate changelog entry.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@www/src/lib/content/changelog.ts` around lines 19 - 55, The changelog object
for version "1.3.31" has stale metadata: update the title and date fields to
match this release (e.g., change title from "Add table actions menu" to a
current title like "Add confirmation dialog for delete record" or another
accurate summary, and set date to today's date) so the entry for version
"1.3.31" is consistent; locate the changelog entry by the version property
"1.3.31" and modify the title and date fields accordingly in the object where
features, bugsFixed, and improvements are defined.
www/src/lib/content/roadmap.ts (1)

86-109: ⚠️ Potential issue | 🟡 Minor

"Data Management Improvements" parent status should be "in-progress".

Two of five items under this section are now marked as "completed" (lines 91, 99), but the parent status on Line 87 remains "planned". This is inconsistent with the pattern used for other sections (e.g., "Core Views & Tabs" and "Multi-Database Support" are both "in-progress" when they have a mix of completed and planned items).

Proposed fix
 	{
 		title: "Data Management Improvements",
-		status: "planned",
+		status: "in-progress",
 		items: [
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@www/src/lib/content/roadmap.ts` around lines 86 - 109, The parent entry with
title "Data Management Improvements" currently has status "planned" but contains
a mix of completed and planned items; update its status to "in-progress" in the
roadmap object in www/src/lib/content/roadmap.ts by changing the status field on
the "Data Management Improvements" entry from "planned" to "in-progress" so it
matches the item states and the pattern used by other mixed-status sections.
packages/core/src/components/table-tab/header/delete-btn.tsx (1)

39-53: ⚠️ Potential issue | 🔴 Critical

Bug: relatedRecords local variable shadows state and FK violations aren't handled correctly.

Line 41 declares let relatedRecords: RelatedRecord[] | undefined which shadows the state variable from Line 33 and is never assigned. More critically, the error handling approach is broken: FK violations return successfully from deleteCells() with fkViolation: true in the result—they don't throw an exception. This means the catch block (Lines 48-52) never executes for FK violations, and the ForceDeleteDialog never receives related record data.

Additionally, use-delete-cell.ts (lines 140-143) handles 409 responses but discards the relatedRecords when returning, compounding the problem.

The correct pattern exists elsewhere in the codebase (sidebar-list-tables-menu.tsx): check result.fkViolation on success and extract result.relatedRecords to pass to the dialog.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/core/src/components/table-tab/header/delete-btn.tsx` around lines 39
- 53, handleConfirmDelete currently declares a useless local relatedRecords and
relies on exceptions for FK violations; instead, remove the local relatedRecords
variable and inspect the result returned by deleteCells for result.fkViolation
and result.relatedRecords after the await; if fkViolation is true, call
setPendingRowData(rowData), setRelatedRecords(result.relatedRecords || []), and
setIsOpenFkDialog(true) otherwise proceed to setRowSelection({}) on success;
also update the deletion hook (use-delete-cell.ts) to propagate relatedRecords
in its successful response when a 409/FK case is detected so callers can read
result.relatedRecords.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@packages/core/src/components/table-tab/header/delete-btn.tsx`:
- Around line 39-53: handleConfirmDelete currently declares a useless local
relatedRecords and relies on exceptions for FK violations; instead, remove the
local relatedRecords variable and inspect the result returned by deleteCells for
result.fkViolation and result.relatedRecords after the await; if fkViolation is
true, call setPendingRowData(rowData), setRelatedRecords(result.relatedRecords
|| []), and setIsOpenFkDialog(true) otherwise proceed to setRowSelection({}) on
success; also update the deletion hook (use-delete-cell.ts) to propagate
relatedRecords in its successful response when a 409/FK case is detected so
callers can read result.relatedRecords.

In `@www/src/lib/content/changelog.ts`:
- Around line 19-55: The changelog object for version "1.3.31" has stale
metadata: update the title and date fields to match this release (e.g., change
title from "Add table actions menu" to a current title like "Add confirmation
dialog for delete record" or another accurate summary, and set date to today's
date) so the entry for version "1.3.31" is consistent; locate the changelog
entry by the version property "1.3.31" and modify the title and date fields
accordingly in the object where features, bugsFixed, and improvements are
defined.

In `@www/src/lib/content/roadmap.ts`:
- Around line 86-109: The parent entry with title "Data Management Improvements"
currently has status "planned" but contains a mix of completed and planned
items; update its status to "in-progress" in the roadmap object in
www/src/lib/content/roadmap.ts by changing the status field on the "Data
Management Improvements" entry from "planned" to "in-progress" so it matches the
item states and the pattern used by other mixed-status sections.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
packages/core/src/components/table-tab/table-head-row.tsx (3)

114-127: ⚠️ Potential issue | 🟡 Minor

handleConfirmDelete has no error handling — dialog state leaks on failure

If deleteColumn rejects, none of the cleanup (setDeleteDialogOpen(false), setColumnToDelete(null), setCascadeDelete(false)) runs, leaving the dialog stuck open with stale state.

🛡️ Proposed fix
 const handleConfirmDelete = useCallback(async () => {
     if (!columnToDelete || !activeTableName) return;
 
-    await deleteColumn({
-        db: activeTableName,
-        tableName: activeTableName,
-        columnName: columnToDelete,
-        cascade: cascadeDelete,
-    });
-
-    setDeleteDialogOpen(false);
-    setColumnToDelete(null);
-    setCascadeDelete(false);
+    try {
+        await deleteColumn({
+            db: activeTableName,
+            tableName: activeTableName,
+            columnName: columnToDelete,
+            cascade: cascadeDelete,
+        });
+    } finally {
+        setDeleteDialogOpen(false);
+        setColumnToDelete(null);
+        setCascadeDelete(false);
+    }
 }, [columnToDelete, activeTableName, deleteColumn, cascadeDelete]);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/core/src/components/table-tab/table-head-row.tsx` around lines 114 -
127, handleConfirmDelete currently calls deleteColumn without error handling, so
if deleteColumn rejects the cleanup (setDeleteDialogOpen, setColumnToDelete,
setCascadeDelete) never runs; wrap the await deleteColumn(...) call in try/catch
and move the state cleanup into a finally block so the dialog always closes and
state resets, and in the catch log or surface the error (e.g., via console.error
or a toast) to inform the user. Ensure you update the useCallback body for
handleConfirmDelete, keeping the same dependencies.

313-317: ⚠️ Potential issue | 🟡 Minor

Whitespace artifact in dialog description — closing " is on a new line

JSX normalises the newline + indentation between {columnToDelete} and "? into a space, rendering as "columnName "? (space before the closing quote).

✏️ Proposed fix
-                    Are you sure you want to delete the column "{columnToDelete}
-                    "? This action cannot be undone and will permanently remove all data in this
-                    column.
+                    Are you sure you want to delete the column "{columnToDelete}"? This action
+                    cannot be undone and will permanently remove all data in this column.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/core/src/components/table-tab/table-head-row.tsx` around lines 313 -
317, The AlertDialogDescription contains a whitespace artifact because the
closing quote and question mark are on the next line after the {columnToDelete}
interpolation; update the JSX around AlertDialogDescription in
table-head-row.tsx so the punctuation directly follows the {columnToDelete}
expression (i.e., move the closing quote and ? to the same line/JSX node as
{columnToDelete}) to remove the extra space; locate the AlertDialogDescription
element that references columnToDelete and adjust the template so the expression
and trailing punctuation are contiguous.

117-122: ⚠️ Potential issue | 🟠 Major

db is incorrectly set to the table name instead of the database identifier

activeTableName is sourced from Route.useParams() as the $table URL segment — it is the table name, not the database name. Passing it as db creates a mismatch with the function's contract, which expects a database identifier.

The deleteColumn hook actually retrieves the correct database from useDatabaseStore() and ignores the db parameter passed by the component, but this is confusing and fragile: if the hook implementation changes to use the passed db value, the deletion will fail with an incorrect database identifier.

Fix: Remove the db parameter from the deleteColumn call entirely, since the hook manages database selection via the store:

Suggested fix
 await deleteColumn({
-    db: activeTableName,
     tableName: activeTableName,
     columnName: columnToDelete,
     cascade: cascadeDelete,
 });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/core/src/components/table-tab/table-head-row.tsx` around lines 117 -
122, The call to deleteColumn incorrectly passes db: activeTableName
(activeTableName comes from Route.useParams() and is a table name); remove the
db property from the deleteColumn call so the hook uses the database from
useDatabaseStore() as intended. Update the invocation in table-head-row.tsx
(where deleteColumn is called with db, tableName: activeTableName, columnName:
columnToDelete, cascade: cascadeDelete) to omit the db field and keep tableName,
columnName and cascade intact; ensure no other code in this component relies on
that db argument.
🧹 Nitpick comments (1)
www/public/robots.txt (1)

6-8: Redundant Allow directives under User-agent: *

Allow: / already permits all paths for all crawlers. The explicit Allow: /roadmap, Allow: /docs, and Allow: /changelog lines are no-ops here and can be removed for clarity.

🧹 Optional cleanup
 User-agent: *
 Allow: /
-Allow: /roadmap
-Allow: /docs
-Allow: /changelog
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@www/public/robots.txt` around lines 6 - 8, In the User-agent: * section of
robots.txt remove the redundant explicit Allow directives for specific paths
(the lines containing "Allow: /roadmap", "Allow: /docs", and "Allow:
/changelog") because "Allow: /" already permits all paths; keep the single
"Allow: /" directive (or explicit path allows only if you intend to restrict
others) and update comments if needed for clarity.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@www/src/lib/content/changelog.ts`:
- Around line 19-20: The changelog entry currently shows version: "1.3.32" with
date "2026-02-18" but skips 1.3.31; either correct the version string in the
changelog object from "1.3.32" to "1.3.31" (update the line containing version:
"1.3.32") or, if 1.3.32 is intentional because 1.3.31 was released separately,
add a short comment/note near the entry clarifying that 1.3.31 was a separate
hotfix so the version jump is intentional.

---

Outside diff comments:
In `@packages/core/src/components/table-tab/table-head-row.tsx`:
- Around line 114-127: handleConfirmDelete currently calls deleteColumn without
error handling, so if deleteColumn rejects the cleanup (setDeleteDialogOpen,
setColumnToDelete, setCascadeDelete) never runs; wrap the await
deleteColumn(...) call in try/catch and move the state cleanup into a finally
block so the dialog always closes and state resets, and in the catch log or
surface the error (e.g., via console.error or a toast) to inform the user.
Ensure you update the useCallback body for handleConfirmDelete, keeping the same
dependencies.
- Around line 313-317: The AlertDialogDescription contains a whitespace artifact
because the closing quote and question mark are on the next line after the
{columnToDelete} interpolation; update the JSX around AlertDialogDescription in
table-head-row.tsx so the punctuation directly follows the {columnToDelete}
expression (i.e., move the closing quote and ? to the same line/JSX node as
{columnToDelete}) to remove the extra space; locate the AlertDialogDescription
element that references columnToDelete and adjust the template so the expression
and trailing punctuation are contiguous.
- Around line 117-122: The call to deleteColumn incorrectly passes db:
activeTableName (activeTableName comes from Route.useParams() and is a table
name); remove the db property from the deleteColumn call so the hook uses the
database from useDatabaseStore() as intended. Update the invocation in
table-head-row.tsx (where deleteColumn is called with db, tableName:
activeTableName, columnName: columnToDelete, cascade: cascadeDelete) to omit the
db field and keep tableName, columnName and cascade intact; ensure no other code
in this component relies on that db argument.

---

Nitpick comments:
In `@www/public/robots.txt`:
- Around line 6-8: In the User-agent: * section of robots.txt remove the
redundant explicit Allow directives for specific paths (the lines containing
"Allow: /roadmap", "Allow: /docs", and "Allow: /changelog") because "Allow: /"
already permits all paths; keep the single "Allow: /" directive (or explicit
path allows only if you intend to restrict others) and update comments if needed
for clarity.

Comment on lines +19 to +20
version: "1.3.32",
date: "2026-02-18",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Version jumps from 1.3.301.3.32, skipping 1.3.31

Please confirm this is intentional (e.g., a hotfix was shipped separately at 1.3.31). If not, correct the version number for consistency.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@www/src/lib/content/changelog.ts` around lines 19 - 20, The changelog entry
currently shows version: "1.3.32" with date "2026-02-18" but skips 1.3.31;
either correct the version string in the changelog object from "1.3.32" to
"1.3.31" (update the line containing version: "1.3.32") or, if 1.3.32 is
intentional because 1.3.31 was released separately, add a short comment/note
near the entry clarifying that 1.3.31 was a separate hotfix so the version jump
is intentional.

@husamql3 husamql3 merged commit e538ae5 into main Feb 20, 2026
4 of 5 checks passed
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.

[ENHANCEMENT]: update Rows per page to be an input field for more flexibility

1 participant