Skip to content

add some ux features#17

Merged
listlessbird merged 7 commits into
mainfrom
table-ctx-focus
May 19, 2026
Merged

add some ux features#17
listlessbird merged 7 commits into
mainfrom
table-ctx-focus

Conversation

@listlessbird
Copy link
Copy Markdown
Owner

add features like focus/copy table nodes in editor, various state management and also legends etc

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 19, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
dbml-viz cf8fb58 May 19 2026, 03:27 AM

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 19, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
dbml-viz-parser cf8fb58 May 19 2026, 03:27 AM

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 19bde7e3eb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +216 to +219
columnsByTable: new Map([
[selected.from.tableId, selected.from.columns],
[selected.to.tableId, selected.to.columns],
]),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Union both endpoints for self-references

For a self-referential relationship, selected.from.tableId and selected.to.tableId are the same key, so the second Map entry overwrites the first. In schemas like employees.manager_id -> employees.id, selecting the edge only highlights the target column and drops the source/FK column from selectedRelationColumns, making the new relationship-selection affordance incomplete for common self-references. Merge the two column arrays when both endpoints are on the same table.

Useful? React with 👍 / 👎.

Comment on lines +67 to +69
sourceFocusStore
.getState()
.requestSourceFocus({ tableName: table.name });
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve schema when focusing source

This sends only the bare table name to the source-focus locator. When the parsed schema has two schema-qualified tables with the same name, e.g. public.users and audit.users, clicking “Focus in Schema Source” for the second one still searches for users and focuses the first match in the document; the column action is fed the same bare table.name from TableNode. Include table.schema (or a stable table id/source range) so focus targets the selected table rather than the first table with that name.

Useful? React with 👍 / 👎.

@listlessbird listlessbird merged commit a22b316 into main May 19, 2026
2 of 3 checks passed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cf8fb58247

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const note: SharedStickyNote = {
id,
color: "yellow",
text: `#${table.name}\n`,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Generate unambiguous links for schema-qualified tables

When the schema contains duplicate table names in different schemas, this generated #${table.name} token is ambiguous because sticky-link resolution indexes tables by bare table.name and later entries overwrite earlier ones. In that case, choosing “Add sticky note for table” on public.users can create a note that links to audit.users (or another same-named table) instead of the selected table; the generated link needs to carry schema/id information or avoid claiming a table link when it cannot be represented unambiguously.

Useful? React with 👍 / 👎.

Comment on lines +13 to +16
return new RegExp(
String.raw`\b(?:CREATE\s+TABLE(?:\s+IF\s+NOT\s+EXISTS)?|Table)\s+` +
String.raw`(?:[\w"\x60.]+\.)?` +
String.raw`["\x60]?` +
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Match bracket-quoted SQL Server identifiers

For SQL Server sources such as CREATE TABLE [users] or CREATE TABLE [dbo].[users], this locator never matches because the table regex only allows double quotes/backticks around the identifier and the optional prefix character class excludes brackets. The app exposes an mssql dialect, so “Focus in Schema Source” silently consumes the request without moving the cursor for common SQL Server schemas; include []-quoted identifiers in both the table and prefix patterns.

Useful? React with 👍 / 👎.

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