Skip to content

Ddl ai#1772

Merged
lyubov-voloshko merged 5 commits into
mainfrom
ddl-ai
May 14, 2026
Merged

Ddl ai#1772
lyubov-voloshko merged 5 commits into
mainfrom
ddl-ai

Conversation

@lyubov-voloshko
Copy link
Copy Markdown
Collaborator

No description provided.

lyubov-voloshko and others added 3 commits May 14, 2026 13:21
Move AI schema generation from the dashboard into a dedicated
edit-database-schema component with its own route. Add a schema
edit button to connection cards and update the tables list with
an edit-schema action.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ist scroll

Navigate to connection dashboard after hosted database rename dialog closes.
Remove max-height/overflow scroll from schema editor SQL changes list.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Display current database structure diagram when opening schema editor
- Show updated diagram after successfully applying schema changes
- Add zoom in/out/reset controls for diagram viewing
- Convert "Open tables" from button to router link
- Defer navigation until user explicitly clicks "Open tables"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 14, 2026 15:22
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 14, 2026

Warning

Rate limit exceeded

@lyubov-voloshko has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 58 minutes and 26 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f98feb0b-822e-48ae-b9ef-3e8fe8b0e4e6

📥 Commits

Reviewing files that changed from the base of the PR and between 1096f52 and 7a1f992.

📒 Files selected for processing (14)
  • frontend/src/app/app-routing.module.ts
  • frontend/src/app/components/connections-list/own-connections/own-connections.component.css
  • frontend/src/app/components/connections-list/own-connections/own-connections.component.html
  • frontend/src/app/components/connections-list/own-connections/own-connections.component.ts
  • frontend/src/app/components/dashboard/dashboard.component.css
  • frontend/src/app/components/dashboard/dashboard.component.html
  • frontend/src/app/components/dashboard/dashboard.component.ts
  • frontend/src/app/components/dashboard/db-tables-list/db-tables-list.component.css
  • frontend/src/app/components/dashboard/db-tables-list/db-tables-list.component.html
  • frontend/src/app/components/dashboard/db-tables-list/db-tables-list.component.ts
  • frontend/src/app/components/edit-database-schema/edit-database-schema.component.css
  • frontend/src/app/components/edit-database-schema/edit-database-schema.component.html
  • frontend/src/app/components/edit-database-schema/edit-database-schema.component.ts
  • frontend/src/app/services/table-schema.service.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ddl-ai

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.

@lyubov-voloshko lyubov-voloshko enabled auto-merge May 14, 2026 15:22
@coderabbitai coderabbitai Bot requested a review from gugu May 14, 2026 15:23
@lyubov-voloshko lyubov-voloshko merged commit abdbf3b into main May 14, 2026
15 checks passed
@lyubov-voloshko lyubov-voloshko deleted the ddl-ai branch May 14, 2026 15:27
Copy link
Copy Markdown
Contributor

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 introduces a dedicated “Edit Database Schema” flow in the Angular frontend: a new routed page for AI-driven schema edits with optional Mermaid ER diagrams, plus UI entry points for schema editing from the connections list. It also replaces the previous embedded schema-editor panel usage in the dashboard.

Changes:

  • Added Mermaid/Markdown-powered diagram rendering and a routed “Edit Database Schema” page.
  • Updated schema generation/approval calls and added a diagram fetch endpoint wrapper in TableSchemaService.
  • Removed the dashboard’s embedded “edit structure” panel and added a schema-edit icon action to connection cards.

Reviewed changes

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

Show a summary per file
File Description
frontend/src/app/services/table-schema.service.ts Adds diagram response type + diagram fetch; changes generate/approve to a throwing fetch helper.
frontend/src/app/components/edit-database-schema/edit-database-schema.component.ts New routed/embedded component behavior, Mermaid init, diagram loading, zoom controls.
frontend/src/app/components/edit-database-schema/edit-database-schema.component.html Adds routed header, diagram rendering via ngx-markdown Mermaid, zoom UI, “Open tables” CTA.
frontend/src/app/components/edit-database-schema/edit-database-schema.component.css Styles for routed layout, diagram container/zoom, loading states, and footer CTA.
frontend/src/app/components/dashboard/db-tables-list/db-tables-list.component.ts Removes editStructure output event.
frontend/src/app/components/dashboard/db-tables-list/db-tables-list.component.html Removes “Edit structure” buttons from sidebar.
frontend/src/app/components/dashboard/db-tables-list/db-tables-list.component.css Adjusts sticky positioning after removing edit-structure section.
frontend/src/app/components/dashboard/dashboard.component.ts Swaps old schema component for new one; removes embedded editor state.
frontend/src/app/components/dashboard/dashboard.component.html Uses <app-edit-database-schema> for no-tables flow; removes embedded editor panel and bindings.
frontend/src/app/components/dashboard/dashboard.component.css Removes embedded schema editor panel CSS.
frontend/src/app/components/connections-list/own-connections/own-connections.component.ts Adds MatTooltipModule; navigates to dashboard after rename dialog closes.
frontend/src/app/components/connections-list/own-connections/own-connections.component.html Adds schema edit icon/link on connection cards (edit access only).
frontend/src/app/components/connections-list/own-connections/own-connections.component.css Adds layout support and schema icon button styles.
frontend/src/app/app-routing.module.ts Adds edit-database-schema/:connection-id route.
Comments suppressed due to low confidence (5)

frontend/src/app/components/edit-database-schema/edit-database-schema.component.ts:72

  • EditDatabaseSchemaComponent implements AfterViewInit, but ngAfterViewInit is declared async (so it returns Promise<void>), which is not signature-compatible with AfterViewInit’s ngAfterViewInit(): void and can cause a TS compile error. Consider making ngAfterViewInit() synchronous and calling an internal async initializer (or remove the interface).
    frontend/src/app/components/edit-database-schema/edit-database-schema.component.ts:173
  • onReject() always appends the "Changes rejected" success message even if the reject request fails (since rejectBatch() can return null on errors and no error handling is done here). This can leave the UI out of sync with backend state; handle the failure case (e.g. catch/branch on a falsy response and show an error message instead).
    frontend/src/app/components/edit-database-schema/edit-database-schema.component.html:113
  • Icon-only diagram zoom controls don’t provide an accessible name. Add aria-label (or matTooltip + aria-label) to the zoom in/out/reset buttons so screen readers can announce their purpose.
    frontend/src/app/components/edit-database-schema/edit-database-schema.component.css:411
  • .schema-chat__open-tables styles target button mat-icon, but the template uses an <a mat-flat-button>, so these icon spacing rules won’t apply. Update the selector to match the actual rendered element/classes (e.g. target the anchor or the Material button classes) so the icon aligns as intended.
    frontend/src/app/components/edit-database-schema/edit-database-schema.component.css:4
  • :host height uses a hard-coded 44px offset (calc(100vh - 44px)), while the routed layout below uses var(--mat-toolbar-standard-height). Using the same CSS variable (or another shared token) would avoid breakage if the toolbar height changes and keeps the two modes consistent.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +64 to +71
private async _fetchOrThrow<T>(url: string, body: unknown): Promise<T> {
const fullUrl = `${environment.apiRoot || '/api'}${url}`;
const response = await fetch(fullUrl, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
credentials: 'include',
body: JSON.stringify(body),
});
Comment on lines 56 to 57
async rejectBatch(batchId: string): Promise<SchemaChangeBatchResponse | null> {
return this._api.post<SchemaChangeBatchResponse>(`/table-schema/batch/${batchId}/reject`);
Comment on lines +34 to +40
<a mat-icon-button
class="connectionSchemaButton"
routerLink="/edit-database-schema/{{connectionItem.connection.id}}"
matTooltip="Edit schema"
(click)="$event.stopPropagation()">
<mat-icon>schema</mat-icon>
</a>
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