Skip to content

Conversation

tnyo43
Copy link
Member

@tnyo43 tnyo43 commented Oct 7, 2025

Issue

- resolve:

Why is this change needed?

We have implement some similar URL handling function in different components. This PR will integrate them into util directory. Also, it introduce HashSchema to give better types to the functions.

Summary by CodeRabbit

  • Refactor
    • Centralized URL/query handling and element ID generation for ERD internals; no visible UI changes.
  • Tests
    • Added unit tests for query-string behavior when activating a table and for column-hash validation.
  • Chores
    • Expanded public exports and added types/schemas to make ERD utilities reusable across the codebase.

Copy link

changeset-bot bot commented Oct 7, 2025

⚠️ No Changeset found

Latest commit: 8b2c946

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Oct 7, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
liam-app Ready Ready Preview Comment Oct 7, 2025 1:04am
liam-assets Ready Ready Preview Comment Oct 7, 2025 1:04am
liam-erd-sample Ready Ready Preview Comment Oct 7, 2025 1:04am
liam-storybook Ready Ready Preview Comment Oct 7, 2025 1:04am
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
liam-docs Ignored Ignored Preview Oct 7, 2025 1:04am

Copy link
Contributor

coderabbitai bot commented Oct 7, 2025

Walkthrough

Adds URL utilities for table link hrefs and column element IDs, introduces a hash schema and type for column element IDs, re-exports the new utilities and schema barrels, updates two components to use the shared utilities, and adds tests for the URL helper and hash schema.

Changes

Cohort / File(s) Summary
Components switching to shared URL helpers
frontend/packages/erd-core/src/features/erd/components/ERDContent/components/TableNode/TableDetail/Columns/ColumnsItem/ColumnsItem.tsx, frontend/packages/erd-core/src/features/erd/components/ERDRenderer/CommandPalette/CommandPaletteOptions/TableOptions.tsx
Replace local helper implementations with imports from shared utils (getTableColumnElementId, getTableLinkHref) and delegate ID/href generation to those utilities. No component API signature changes.
URL utils added and exported
frontend/packages/erd-core/src/features/erd/utils/url/getTableColumnElementId.ts, frontend/packages/erd-core/src/features/erd/utils/url/getTableLinkHref.ts, frontend/packages/erd-core/src/features/erd/utils/url/index.ts, frontend/packages/erd-core/src/features/erd/utils/index.ts
Add pure utility functions for building column element IDs and table link hrefs; export them via url/index.ts and re-export from utils/index.ts.
Hash schema module introduced
frontend/packages/erd-core/src/schemas/hash/schemas.ts, frontend/packages/erd-core/src/schemas/hash/types.ts, frontend/packages/erd-core/src/schemas/hash/index.ts, frontend/packages/erd-core/src/schemas/index.ts
Add hashSchema (validates strings of the form ${table}__columns__${column}), a Hash type alias, and barrel exports; re-export hash module from top-level schemas index.
Tests added
frontend/packages/erd-core/src/features/erd/utils/url/getTableLinkHref.test.ts, frontend/packages/erd-core/src/schemas/hash/schemas.test.ts
Add tests verifying query param preservation and the hash schema's accepted/rejected patterns.

Sequence Diagram(s)

sequenceDiagram
  participant UI as Component (ColumnsItem / TableOptions)
  participant Utils as URL utils
  participant Browser as window.location

  UI->>Utils: getTableColumnElementId(tableId, columnName)
  Note right of Utils #D0F0C0: pure ID string generation
  Utils-->>UI: "#<table>__columns__<column>"

  UI->>Utils: getTableLinkHref(activeTableName)
  Utils->>Browser: read window.location.search
  Note right of Utils #F0E68C: preserve existing params, set active
  Utils-->>UI: "?...&active=<table>"
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • junkisai
  • FunamaYukina
  • hoshinotsuyoshi
  • NoritakaIkeda
  • MH4GF

Poem

I nibble paths and stitch each link,
A rabbit's map — no fray or kink.
Hashes hop between table beds,
Columns snug where carrot threads.
With tidy utils, I bound and track. 🥕🐇

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The description follows the template by including the Issue and Why sections but fails to specify an issue reference under “resolve:” and retains placeholder formatting, leaving the Issue section incomplete. Please fill in the “- resolve:” field with the appropriate issue number or remove the section if there is no linked issue, and delete any placeholder or strikethrough formatting to complete the template.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly captures the primary changes by mentioning both the addition of the Hash schema and the consolidation of URL handling functions within the erd-core package, making it clear and specific to the changeset.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/table-column-url-functions

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

supabase bot commented Oct 7, 2025

Updates to Preview Branch (refactor/table-column-url-functions) ↗︎

Deployments Status Updated
Database Tue, 07 Oct 2025 00:59:52 UTC
Services Tue, 07 Oct 2025 00:59:52 UTC
APIs Tue, 07 Oct 2025 00:59:52 UTC

Tasks are run on every commit but only new migration files are pushed.
Close and reopen this PR if you want to apply changes from existing seed or migration files.

Tasks Status Updated
Configurations Tue, 07 Oct 2025 00:59:53 UTC
Migrations Tue, 07 Oct 2025 00:59:56 UTC
Seeding Tue, 07 Oct 2025 00:59:56 UTC
Edge Functions Tue, 07 Oct 2025 00:59:56 UTC

View logs for this Workflow Run ↗︎.
Learn more about Supabase for Git ↗︎.

import type { InferOutput } from 'valibot'
import type { hashSchema } from './schemas'

export type Hash = InferOutput<typeof hashSchema>
Copy link
Member Author

Choose a reason for hiding this comment

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

This Hash type is same with ${string}__columns__${string}. It will extend its definition when we allow other hash values by updating hashSchema.

Copy link
Contributor

@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: 3

🧹 Nitpick comments (2)
frontend/packages/erd-core/src/schemas/hash/schemas.ts (1)

3-9: Consider validating that both parts are non-empty.

The current implementation allows strings like "__columns__id" or "users__columns__" (with empty table or column names) to pass validation. If both the table name and column ID should be non-empty, add additional checks.

If stricter validation is desired, apply this diff:

 export const hashSchema = custom<`${string}__columns__${string}`>(
   (input): input is `${string}__columns__${string}` => {
     if (typeof input !== 'string') return false
     const parts = input.split('__columns__')
-    return parts.length === 2
+    return parts.length === 2 && parts[0] !== '' && parts[1] !== ''
   },
 )
frontend/packages/erd-core/src/features/erd/utils/url/getTableLinkHref.test.ts (1)

4-16: Add test cleanup to prevent pollution.

The tests mutate window.location.search but don't reset it afterward. This can cause test pollution if tests run in a specific order or interfere with other tests.

Add cleanup using beforeEach and afterEach:

+import { afterEach, beforeEach, describe, expect, it } from 'vitest'
 import { getTableLinkHref } from './getTableLinkHref'

+let originalSearch: string
+
+beforeEach(() => {
+  originalSearch = window.location.search
+})
+
+afterEach(() => {
+  window.location.search = originalSearch
+})
+
 it('should return the "active" query parameter with the table name', () => {
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 630b3ee and 65f7ec1.

📒 Files selected for processing (12)
  • frontend/packages/erd-core/src/features/erd/components/ERDContent/components/TableNode/TableDetail/Columns/ColumnsItem/ColumnsItem.tsx (2 hunks)
  • frontend/packages/erd-core/src/features/erd/components/ERDRenderer/CommandPalette/CommandPaletteOptions/TableOptions.tsx (1 hunks)
  • frontend/packages/erd-core/src/features/erd/utils/index.ts (1 hunks)
  • frontend/packages/erd-core/src/features/erd/utils/url/getTableColumnElementId.ts (1 hunks)
  • frontend/packages/erd-core/src/features/erd/utils/url/getTableLinkHref.test.ts (1 hunks)
  • frontend/packages/erd-core/src/features/erd/utils/url/getTableLinkHref.ts (1 hunks)
  • frontend/packages/erd-core/src/features/erd/utils/url/index.ts (1 hunks)
  • frontend/packages/erd-core/src/schemas/hash/index.ts (1 hunks)
  • frontend/packages/erd-core/src/schemas/hash/schemas.test.ts (1 hunks)
  • frontend/packages/erd-core/src/schemas/hash/schemas.ts (1 hunks)
  • frontend/packages/erd-core/src/schemas/hash/types.ts (1 hunks)
  • frontend/packages/erd-core/src/schemas/index.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (6)
**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name utility files in camelCase (e.g., mergeSchema.ts)

Files:

  • frontend/packages/erd-core/src/features/erd/utils/url/index.ts
  • frontend/packages/erd-core/src/features/erd/utils/url/getTableColumnElementId.ts
  • frontend/packages/erd-core/src/schemas/index.ts
  • frontend/packages/erd-core/src/schemas/hash/types.ts
  • frontend/packages/erd-core/src/schemas/hash/schemas.ts
  • frontend/packages/erd-core/src/features/erd/utils/url/getTableLinkHref.ts
  • frontend/packages/erd-core/src/schemas/hash/schemas.test.ts
  • frontend/packages/erd-core/src/features/erd/utils/url/getTableLinkHref.test.ts
  • frontend/packages/erd-core/src/schemas/hash/index.ts
  • frontend/packages/erd-core/src/features/erd/utils/index.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript/TSX across the codebase

**/*.{ts,tsx}: Prefer early returns for readability
Use named exports only (no default exports)
Prefer const arrow functions over function declarations for simple utilities (e.g., const toggle = () => {})

Files:

  • frontend/packages/erd-core/src/features/erd/utils/url/index.ts
  • frontend/packages/erd-core/src/features/erd/utils/url/getTableColumnElementId.ts
  • frontend/packages/erd-core/src/schemas/index.ts
  • frontend/packages/erd-core/src/features/erd/components/ERDRenderer/CommandPalette/CommandPaletteOptions/TableOptions.tsx
  • frontend/packages/erd-core/src/features/erd/components/ERDContent/components/TableNode/TableDetail/Columns/ColumnsItem/ColumnsItem.tsx
  • frontend/packages/erd-core/src/schemas/hash/types.ts
  • frontend/packages/erd-core/src/schemas/hash/schemas.ts
  • frontend/packages/erd-core/src/features/erd/utils/url/getTableLinkHref.ts
  • frontend/packages/erd-core/src/schemas/hash/schemas.test.ts
  • frontend/packages/erd-core/src/features/erd/utils/url/getTableLinkHref.test.ts
  • frontend/packages/erd-core/src/schemas/hash/index.ts
  • frontend/packages/erd-core/src/features/erd/utils/index.ts
frontend/packages/**

📄 CodeRabbit inference engine (AGENTS.md)

Shared libraries and tools live under frontend/packages

Files:

  • frontend/packages/erd-core/src/features/erd/utils/url/index.ts
  • frontend/packages/erd-core/src/features/erd/utils/url/getTableColumnElementId.ts
  • frontend/packages/erd-core/src/schemas/index.ts
  • frontend/packages/erd-core/src/features/erd/components/ERDRenderer/CommandPalette/CommandPaletteOptions/TableOptions.tsx
  • frontend/packages/erd-core/src/features/erd/components/ERDContent/components/TableNode/TableDetail/Columns/ColumnsItem/ColumnsItem.tsx
  • frontend/packages/erd-core/src/schemas/hash/types.ts
  • frontend/packages/erd-core/src/schemas/hash/schemas.ts
  • frontend/packages/erd-core/src/features/erd/utils/url/getTableLinkHref.ts
  • frontend/packages/erd-core/src/schemas/hash/schemas.test.ts
  • frontend/packages/erd-core/src/features/erd/utils/url/getTableLinkHref.test.ts
  • frontend/packages/erd-core/src/schemas/hash/index.ts
  • frontend/packages/erd-core/src/features/erd/utils/index.ts
frontend/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Follow existing import patterns and tsconfig path aliases

Files:

  • frontend/packages/erd-core/src/features/erd/utils/url/index.ts
  • frontend/packages/erd-core/src/features/erd/utils/url/getTableColumnElementId.ts
  • frontend/packages/erd-core/src/schemas/index.ts
  • frontend/packages/erd-core/src/features/erd/components/ERDRenderer/CommandPalette/CommandPaletteOptions/TableOptions.tsx
  • frontend/packages/erd-core/src/features/erd/components/ERDContent/components/TableNode/TableDetail/Columns/ColumnsItem/ColumnsItem.tsx
  • frontend/packages/erd-core/src/schemas/hash/types.ts
  • frontend/packages/erd-core/src/schemas/hash/schemas.ts
  • frontend/packages/erd-core/src/features/erd/utils/url/getTableLinkHref.ts
  • frontend/packages/erd-core/src/schemas/hash/schemas.test.ts
  • frontend/packages/erd-core/src/features/erd/utils/url/getTableLinkHref.test.ts
  • frontend/packages/erd-core/src/schemas/hash/index.ts
  • frontend/packages/erd-core/src/features/erd/utils/index.ts
**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Name React component files in PascalCase and use TSX (e.g., App.tsx)

Prefix event handler functions with “handle” (e.g., handleClick)

Files:

  • frontend/packages/erd-core/src/features/erd/components/ERDRenderer/CommandPalette/CommandPaletteOptions/TableOptions.tsx
  • frontend/packages/erd-core/src/features/erd/components/ERDContent/components/TableNode/TableDetail/Columns/ColumnsItem/ColumnsItem.tsx
**/*.test.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Write unit tests with filenames ending in .test.ts or .test.tsx colocated near source

Files:

  • frontend/packages/erd-core/src/schemas/hash/schemas.test.ts
  • frontend/packages/erd-core/src/features/erd/utils/url/getTableLinkHref.test.ts
🧠 Learnings (2)
📚 Learning: 2025-08-23T03:36:21.590Z
Learnt from: tnyo43
PR: liam-hq/liam#3129
File: frontend/packages/erd-core/src/features/erd/components/ERDRenderer/CommandPalette/CommandPaletteOptions/TableOptions.tsx:11-15
Timestamp: 2025-08-23T03:36:21.590Z
Learning: The CommandPalette and its child components (including CommandPaletteContent and TableOptions) in the ERD renderer are only rendered on the client side, so SSR safety checks for window object access are not necessary in this context.

Applied to files:

  • frontend/packages/erd-core/src/features/erd/components/ERDRenderer/CommandPalette/CommandPaletteOptions/TableOptions.tsx
📚 Learning: 2025-07-30T05:52:56.270Z
Learnt from: hoshinotsuyoshi
PR: liam-hq/liam#2771
File: frontend/internal-packages/schema-bench/src/cli/executeLiamDb.ts:22-22
Timestamp: 2025-07-30T05:52:56.270Z
Learning: The schema-bench package (frontend/internal-packages/schema-bench) has been converted from ESM to CommonJS mode by removing "type": "module" from package.json, making __dirname available and correct to use in TypeScript files within this package.

Applied to files:

  • frontend/packages/erd-core/src/schemas/hash/index.ts
🧬 Code graph analysis (4)
frontend/packages/erd-core/src/features/erd/components/ERDContent/components/TableNode/TableDetail/Columns/ColumnsItem/ColumnsItem.tsx (1)
frontend/packages/erd-core/src/features/erd/utils/url/getTableColumnElementId.ts (1)
  • getTableColumnElementId (3-6)
frontend/packages/erd-core/src/schemas/hash/types.ts (1)
frontend/packages/erd-core/src/schemas/hash/schemas.ts (1)
  • hashSchema (3-9)
frontend/packages/erd-core/src/schemas/hash/schemas.test.ts (1)
frontend/packages/erd-core/src/schemas/hash/schemas.ts (1)
  • hashSchema (3-9)
frontend/packages/erd-core/src/features/erd/utils/url/getTableLinkHref.test.ts (1)
frontend/packages/erd-core/src/features/erd/utils/url/getTableLinkHref.ts (1)
  • getTableLinkHref (3-7)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: frontend-ci
  • GitHub Check: frontend-lint
  • GitHub Check: security-review
  • GitHub Check: Supabase Preview
🔇 Additional comments (8)
frontend/packages/erd-core/src/features/erd/utils/url/index.ts (1)

1-2: LGTM!

Clean barrel file following standard re-export patterns.

frontend/packages/erd-core/src/features/erd/utils/index.ts (1)

8-8: LGTM!

Consistent with existing export pattern in the file.

frontend/packages/erd-core/src/features/erd/components/ERDContent/components/TableNode/TableDetail/Columns/ColumnsItem/ColumnsItem.tsx (1)

10-10: LGTM!

Good refactoring to extract the element ID generation to a shared utility. The usage is consistent with the utility's intended purpose.

Also applies to: 33-33

frontend/packages/erd-core/src/schemas/hash/types.ts (1)

1-4: LGTM!

Standard Valibot pattern for deriving TypeScript types from runtime schemas.

frontend/packages/erd-core/src/schemas/index.ts (1)

1-1: LGTM!

Consistent with existing export pattern in the schemas index.

frontend/packages/erd-core/src/schemas/hash/index.ts (1)

1-2: LGTM!

Clean barrel file following standard re-export patterns for the hash module.

frontend/packages/erd-core/src/features/erd/components/ERDRenderer/CommandPalette/CommandPaletteOptions/TableOptions.tsx (1)

6-6: LGTM!

Good refactoring to extract the link href generation to a shared utility. The usage at lines 42 and 62 is consistent and maintains the same functionality as the previous local implementation.

Also applies to: 42-42, 62-62

frontend/packages/erd-core/src/features/erd/utils/url/getTableLinkHref.ts (1)

3-7: Implementation is correct for browser environments.

The function correctly constructs the query string using URLSearchParams and preserves existing parameters. The use of satisfies QueryParam provides type safety at compile time.

Note: Direct access to window.location.search makes the function harder to test (tests must mutate the global window object) and not SSR-compatible. If testability or SSR support becomes a concern, consider accepting window.location.search as a parameter with a default value.

Copy link
Contributor

@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: 0

🧹 Nitpick comments (1)
frontend/packages/erd-core/src/features/erd/utils/url/getTableLinkHref.ts (1)

3-7: Consider parameterizing the search source for better testability.

The function directly accesses window.location.search, which couples it tightly to the browser environment. This makes unit testing more difficult and prevents usage in server-side rendering contexts.

Consider refactoring to accept the search string as an optional parameter:

-export const getTableLinkHref = (activeTableName: string) => {
-  const searchParams = new URLSearchParams(window.location.search)
+export const getTableLinkHref = (
+  activeTableName: string,
+  searchString = window.location.search
+) => {
+  const searchParams = new URLSearchParams(searchString)
   searchParams.set('active' satisfies QueryParam, activeTableName)
   return `?${searchParams.toString()}`
 }

This change would enable easier unit testing by allowing you to pass test query strings while maintaining the current behavior when called without the second parameter.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 65f7ec1 and 8b2c946.

📒 Files selected for processing (12)
  • frontend/packages/erd-core/src/features/erd/components/ERDContent/components/TableNode/TableDetail/Columns/ColumnsItem/ColumnsItem.tsx (2 hunks)
  • frontend/packages/erd-core/src/features/erd/components/ERDRenderer/CommandPalette/CommandPaletteOptions/TableOptions.tsx (1 hunks)
  • frontend/packages/erd-core/src/features/erd/utils/index.ts (1 hunks)
  • frontend/packages/erd-core/src/features/erd/utils/url/getTableColumnElementId.ts (1 hunks)
  • frontend/packages/erd-core/src/features/erd/utils/url/getTableLinkHref.test.ts (1 hunks)
  • frontend/packages/erd-core/src/features/erd/utils/url/getTableLinkHref.ts (1 hunks)
  • frontend/packages/erd-core/src/features/erd/utils/url/index.ts (1 hunks)
  • frontend/packages/erd-core/src/schemas/hash/index.ts (1 hunks)
  • frontend/packages/erd-core/src/schemas/hash/schemas.test.ts (1 hunks)
  • frontend/packages/erd-core/src/schemas/hash/schemas.ts (1 hunks)
  • frontend/packages/erd-core/src/schemas/hash/types.ts (1 hunks)
  • frontend/packages/erd-core/src/schemas/index.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (9)
  • frontend/packages/erd-core/src/features/erd/utils/url/index.ts
  • frontend/packages/erd-core/src/schemas/index.ts
  • frontend/packages/erd-core/src/features/erd/utils/url/getTableLinkHref.test.ts
  • frontend/packages/erd-core/src/schemas/hash/index.ts
  • frontend/packages/erd-core/src/features/erd/utils/url/getTableColumnElementId.ts
  • frontend/packages/erd-core/src/features/erd/components/ERDRenderer/CommandPalette/CommandPaletteOptions/TableOptions.tsx
  • frontend/packages/erd-core/src/schemas/hash/schemas.ts
  • frontend/packages/erd-core/src/schemas/hash/types.ts
  • frontend/packages/erd-core/src/schemas/hash/schemas.test.ts
🧰 Additional context used
📓 Path-based instructions (5)
**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name utility files in camelCase (e.g., mergeSchema.ts)

Files:

  • frontend/packages/erd-core/src/features/erd/utils/index.ts
  • frontend/packages/erd-core/src/features/erd/utils/url/getTableLinkHref.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript/TSX across the codebase

**/*.{ts,tsx}: Prefer early returns for readability
Use named exports only (no default exports)
Prefer const arrow functions over function declarations for simple utilities (e.g., const toggle = () => {})

Files:

  • frontend/packages/erd-core/src/features/erd/utils/index.ts
  • frontend/packages/erd-core/src/features/erd/utils/url/getTableLinkHref.ts
  • frontend/packages/erd-core/src/features/erd/components/ERDContent/components/TableNode/TableDetail/Columns/ColumnsItem/ColumnsItem.tsx
frontend/packages/**

📄 CodeRabbit inference engine (AGENTS.md)

Shared libraries and tools live under frontend/packages

Files:

  • frontend/packages/erd-core/src/features/erd/utils/index.ts
  • frontend/packages/erd-core/src/features/erd/utils/url/getTableLinkHref.ts
  • frontend/packages/erd-core/src/features/erd/components/ERDContent/components/TableNode/TableDetail/Columns/ColumnsItem/ColumnsItem.tsx
frontend/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Follow existing import patterns and tsconfig path aliases

Files:

  • frontend/packages/erd-core/src/features/erd/utils/index.ts
  • frontend/packages/erd-core/src/features/erd/utils/url/getTableLinkHref.ts
  • frontend/packages/erd-core/src/features/erd/components/ERDContent/components/TableNode/TableDetail/Columns/ColumnsItem/ColumnsItem.tsx
**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Name React component files in PascalCase and use TSX (e.g., App.tsx)

Prefix event handler functions with “handle” (e.g., handleClick)

Files:

  • frontend/packages/erd-core/src/features/erd/components/ERDContent/components/TableNode/TableDetail/Columns/ColumnsItem/ColumnsItem.tsx
🧬 Code graph analysis (1)
frontend/packages/erd-core/src/features/erd/components/ERDContent/components/TableNode/TableDetail/Columns/ColumnsItem/ColumnsItem.tsx (1)
frontend/packages/erd-core/src/features/erd/utils/url/getTableColumnElementId.ts (1)
  • getTableColumnElementId (3-6)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Supabase Preview
  • GitHub Check: frontend-ci
  • GitHub Check: frontend-lint
  • GitHub Check: codeql / languages (javascript) / Perform CodeQL for javascript
  • GitHub Check: Supabase Preview
🔇 Additional comments (2)
frontend/packages/erd-core/src/features/erd/utils/index.ts (1)

8-8: LGTM!

The re-export correctly exposes the new URL utilities as part of the public API, aligning with the PR objective to consolidate URL handling functions.

frontend/packages/erd-core/src/features/erd/components/ERDContent/components/TableNode/TableDetail/Columns/ColumnsItem/ColumnsItem.tsx (1)

10-10: LGTM!

The refactor successfully consolidates the duplicate columnElementId helper by using the shared getTableColumnElementId utility, which aligns with the PR objective to integrate similar implementations across components.

Also applies to: 33-33

Copy link
Member

@junkisai junkisai left a comment

Choose a reason for hiding this comment

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

thx!

@junkisai junkisai added this pull request to the merge queue Oct 7, 2025
Merged via the queue into main with commit 9cedf5c Oct 7, 2025
33 checks passed
@junkisai junkisai deleted the refactor/table-column-url-functions branch October 7, 2025 23:44
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