Skip to content

Conversation

ItzNotABug
Copy link
Member

@ItzNotABug ItzNotABug commented Sep 18, 2025

What does this PR do?

Combo-box was setting the text to empty string, causing load issues.

Test Plan

Manual.

Before -

Screenshot 2025-09-18 at 8 07 30 PM

After -

Screenshot 2025-09-18 at 8 06 58 PM

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

Summary by CodeRabbit

  • New Features

    • None
  • Bug Fixes

    • Prevented background searches while editing relationship columns, reducing unexpected list changes and improving form stability.
  • Chores

    • Updated UI dependencies for icons and Svelte components to the latest revisions, ensuring the latest visual assets and fixes.
  • Style

    • Minor formatting cleanup with no user-facing impact.

Copy link

appwrite bot commented Sep 18, 2025

Console

Project ID: 688b7bf400350cbd60e9

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

Note

Appwrite has a Discord community with over 16 000 members.

@ItzNotABug ItzNotABug self-assigned this Sep 18, 2025
Copy link
Contributor

coderabbitai bot commented Sep 18, 2025

Walkthrough

  • Updated package.json to bump commit pins for two UI dependencies: @appwrite.io/pink-icons-svelte and @appwrite.io/pink-svelte from f4da718 to 4a33959.
  • In src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/columns/relationship.svelte, the reactive condition was changed from if (search) to if (search && !editing), altering when existence checks and debounced table fetches occur.
  • Minor formatting whitespace adjustment in the Svelte file.

Possibly related PRs

Suggested reviewers

  • HarshMN2345

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "Fix: related table not loading" is concise and accurately summarizes the primary user-visible change in the PR — a bugfix in relationship.svelte that prevents the related-table lookup from running while editing so the combo-box no longer clears and related tables load correctly. It focuses on the main functional fix without extraneous detail.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch relationships-fixes

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

🧹 Nitpick comments (2)
src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/columns/relationship.svelte (2)

141-152: Good guard: stop search/fetch while editing. Add a runtime guard to the debounced fetch to avoid stale requests.

If a fetch was already scheduled before editing flips true, it can still run. Add an editing check inside the debounced function to no-op when editing toggles mid-debounce.

Apply outside this hunk:

@@
-const debouncedFetchTables = debounce(async () => {
-    tableList = await getTables();
-    // reset search
-    search = undefined;
-}, 500);
+const debouncedFetchTables = debounce(async () => {
+    if (editing) return; // bail if user is editing now
+    tableList = await getTables();
+    // reset search only when not editing (handles race)
+    if (!editing) search = undefined;
+}, 500);

142-144: Prefer toLowerCase for ID matching.

IDs are ASCII; toLocaleLowerCase() adds unnecessary locale semantics and overhead.

-const exists = tableList?.tables?.some((c) =>
-    c.$id.toLocaleLowerCase().includes(search.toLocaleLowerCase())
-);
+const exists = tableList?.tables?.some((c) =>
+    c.$id.toLowerCase().includes(search.toLowerCase())
+);
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9163a33 and e780e4f.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • package.json (1 hunks)
  • src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/columns/relationship.svelte (2 hunks)
⏰ 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). (2)
  • GitHub Check: e2e
  • GitHub Check: build
🔇 Additional comments (2)
src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/columns/relationship.svelte (1)

194-194: Whitespace tweak is fine.

package.json (1)

27-29: Confirm Pink commits resolve and don’t introduce UI/API regressions.

Both pink packages are now pinned to 4a33959 via pkg.vc. Please ensure the lockfile is refreshed and CI green after install, and that ComboBox behavior is unchanged except for the intended fix.

Run this quick check locally after a clean install to confirm the pins and surface any peer dep warnings:

@ItzNotABug ItzNotABug merged commit f83db43 into main Sep 19, 2025
5 checks passed
@ItzNotABug ItzNotABug deleted the relationships-fixes branch September 19, 2025 05:01
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.

3 participants