Skip to content

Fix DB load not happening after creating first column#2829

Open
atharvadeosthale wants to merge 3 commits intomainfrom
fix-db-load-and-sliders
Open

Fix DB load not happening after creating first column#2829
atharvadeosthale wants to merge 3 commits intomainfrom
fix-db-load-and-sliders

Conversation

@atharvadeosthale
Copy link
Member

@atharvadeosthale atharvadeosthale commented Feb 4, 2026

Fix the DB not loading after creating first column. Additionally fixes the (+) icon to now render the slider to create column, which acted like a dead button before

Before
image

After
image

Summary by CodeRabbit

  • New Features

    • Column creation is now reachable from empty states across all database view modes (except indexes).
    • Newly created columns appear via real-time updates so they show up immediately.
  • Bug Fixes

    • Improved reliability of the column-creation flow with better cleanup and error handling during real-time updates.

@appwrite
Copy link

appwrite bot commented Feb 4, 2026

Console (appwrite/console)

Project ID: 688b7bf400350cbd60e9

Sites (1)
Site Status Logs Preview QR
 console-stage
688b7cf6003b1842c9dc
Ready Ready View Logs Preview URL QR Code

Tip

Schedule functions to run as often as every minute with cron expressions

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 4, 2026

Walkthrough

The PR enables invoking the column-creation flow from empty-state views and wires real-time observation into the column creation process. The EmptySheet usage and its header "+" handler were changed to trigger onOpenCreateColumn when mode != 'indexes', and two EmptySheet instances now pass onOpenCreateColumn to open the create-column sheet. The createColumn form now sets up a per-column observer, subscribes to realtime updates filtered to the created column key, awaits a waitPromise to invalidate the table dependency, and ensures observer/unsubscribe cleanup on success or error.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title 'Fix DB load not happening after creating first column' directly and specifically describes the main bug fix in this changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-db-load-and-sliders

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
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: 1

🤖 Fix all issues with AI agents
In
`@src/routes/`(console)/project-[region]-[project]/databases/database-[database]/table-[table]/createColumn.svelte:
- Around line 148-193: The promise chain attached to waitPromise in submit() can
surface unhandled rejections because invalidate(Dependencies.TABLE) may throw;
update the chain that starts with waitPromise.then(...) to append a .catch(error
=> { /* log or handle error */ }) that handles errors from invalidate and still
ensures stopObserver cleanup (you can keep the existing .finally(() =>
stopObserver?.()) so cleanup always runs); target the waitPromise.then(async ()
=> await invalidate(Dependencies.TABLE)) section and add a catch referencing
invalidate and Dependencies.TABLE so errors are handled gracefully.

@atharvadeosthale atharvadeosthale deleted the fix-db-load-and-sliders branch February 5, 2026 13:00
@atharvadeosthale atharvadeosthale restored the fix-db-load-and-sliders branch February 15, 2026 09:41
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