Skip to content

Conversation

@beeman
Copy link
Contributor

@beeman beeman commented Nov 20, 2025

Description

Simplifies naming of the hooks in db-react package by removing the db prefix.

Eg: usDbSetting() -> useSetting()


Important

Refactor db-react package by removing db prefix from hooks and helpers, updating file names, imports, and related components.

  • Refactor Hooks and Helpers:
    • Remove db prefix from hooks in db-react package, e.g., useDbSetting() to useSetting().
    • Update hooks: use-account-active.tsx, use-account-create.tsx, use-account-delete.tsx, use-account-find-many.tsx, use-account-find-unique.tsx, use-account-live.tsx, use-account-set-active.tsx, use-account-update.tsx, use-network-active.tsx, use-network-create.tsx, use-network-delete.tsx, use-network-find-many.tsx, use-network-find-unique.tsx, use-network-live.tsx, use-network-update.tsx, use-reset.tsx, use-root-loader-data.tsx, use-setting-get-value-live.tsx, use-setting-get-value.tsx, use-setting-set-value.tsx, use-setting.tsx, use-wallet-create.tsx, use-wallet-delete.tsx, use-wallet-find-many.tsx, use-wallet-find-unique.tsx, use-wallet-live.tsx, use-wallet-set-active.tsx, use-wallet-update.tsx.
  • Rename Files:
    • Rename files to remove db prefix, e.g., db-get-or-fetch.tsx to get-or-fetch.tsx, db-account-options.tsx to options-account.tsx, db-network-options.tsx to options-network.tsx, db-setting-options.tsx to options-setting.tsx, db-wallet-options.tsx to options-wallet.tsx, db-query-client.tsx to query-client.tsx.
  • Update Imports:
    • Update imports across various files to reflect new naming conventions.
  • Remove and Add Files:
    • Remove db-loader.tsx and add root-loader.tsx.
  • Schema and Test Updates:
    • Update account-schema.ts to use new import paths.
    • Update solana-address-schema.test.ts to use new import paths.
  • Miscellaneous:
    • Update root-route-loader.tsx and shell-providers.tsx to use new import paths.
    • Update shell-routes.tsx to use new import paths and loader function.

This description was created by Ellipsis for 9cfdc01. You can customize this summary. It will automatically update as commits are pushed.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 20, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

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

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
samui-wallet-web 9cfdc01 Commit Preview URL

Branch Preview URL
Nov 20 2025, 06:06 PM

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to caeeaad in 2 minutes and 54 seconds. Click for details.
  • Reviewed 1873 lines of code in 101 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/settings/src/settings-feature-network-create.tsx:15
  • Draft comment:
    Navigation is not awaited. Instead of using a .then callback with navigate('/settings/networks'), refactor the async submission to use 'await navigate('/settings/networks')' for consistency with our async navigation guideline.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. packages/settings/src/settings-feature-wallet-update.tsx:32
  • Draft comment:
    The navigate call is used within a .then handler without an 'await'. Update the async submission to await the navigate call so that it properly reflects the promise-based behavior.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. packages/settings/src/settings-feature-general-warning-accept-experimental.tsx:15
  • Draft comment:
    The switch’s checked logic is inverted and relies on string values. Consider using a boolean state instead so that 'checked' directly reflects acceptance. This will simplify the onCheckedChange handler.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
4. packages/db-react/src/use-account-live.tsx:8
  • Draft comment:
    If a walletId is optionally provided, it should fall back to the activeWalletId from settings. Consider merging the parameter and the setting value (e.g., using 'const effectiveWalletId = walletId ?? activeWalletId') before using it in the query.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_XCNySfLy9OoodJeS

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed 9fbf6a6 in 2 minutes and 46 seconds. Click for details.
  • Reviewed 1847 lines of code in 100 files
  • Skipped 0 files when reviewing.
  • Skipped posting 5 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/settings/src/settings-feature-network-create.tsx:15
  • Draft comment:
    Ensure that the navigation call is awaited. Instead of chaining .then(() => { navigate('/settings/networks') }), refactor the submit handler to use async/await and call 'await navigate("/settings/networks")' for consistency with async navigation requirements.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. packages/settings/src/settings-feature-network-update.tsx:33
  • Draft comment:
    Await the navigation call after mutation completes. Replace the '.then(() => { navigate('/settings/networks') })' pattern with an async/await variant (e.g. 'await navigate("/settings/networks")') to follow the data router's promise requirement.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. packages/settings/src/settings-feature-wallet-update.tsx:31
  • Draft comment:
    Navigation in the async submit function should be awaited. Use 'await navigate(...)' instead of calling navigate directly within a .then() callback.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
4. packages/db-react/src/use-account-live.tsx:8
  • Draft comment:
    Consider using the activeWalletId obtained from the useSetting hook directly in the query function. Currently, the hook accepts an optional 'walletId' parameter but then retrieves 'activeWalletId' from settings and only uses the (possibly undefined) parameter in the query function.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
5. packages/settings/src/settings-feature-general-warning-accept-experimental.tsx:15
  • Draft comment:
    The Switch component's checked logic is inverted and may be confusing. It is clearer to use 'checked={warningAccepted === "true"}' and update onCheckedChange accordingly, rather than using 'warningAccepted !== "true"' and then inverting the checked value in the handler.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_WBcGGIEMlGN2Ny65

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@beeman beeman force-pushed the beeman/db-ddd-network branch 2 times, most recently from 92c2d01 to 751c7ad Compare November 20, 2025 09:29
@beeman beeman marked this pull request as draft November 20, 2025 12:35
Base automatically changed from beeman/db-ddd-network to main November 20, 2025 17:51
@beeman beeman marked this pull request as ready for review November 20, 2025 18:05
@beeman beeman requested a review from tobeycodes November 20, 2025 18:09
@beeman beeman merged commit 40113f2 into main Nov 20, 2025
15 checks passed
@beeman beeman deleted the beeman/db-react branch November 20, 2025 18:12
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to 9cfdc01 in 12 minutes and 31 seconds. Click for details.
  • Reviewed 1817 lines of code in 98 files
  • Skipped 0 files when reviewing.
  • Skipped posting 5 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/settings/src/settings-feature-network-create.tsx:15
  • Draft comment:
    Await the navigation promise. Instead of using .then(() => { navigate('/settings/networks') }), consider using await navigate('/settings/networks') in an async function.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. packages/settings/src/settings-feature-network-update.tsx:32
  • Draft comment:
    Await the navigate call after mutation. Replace the use of .then(() => { navigate('/settings/networks') }) with an explicit await navigate('/settings/networks') within an async function.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. packages/settings/src/settings-feature-wallet-update.tsx:11
  • Draft comment:
    Await the navigation after wallet update. Similar to network update, ensure that after mutation, the navigate call is awaited.
  • Reason this comment was not posted:
    Comment was on unchanged code.
4. packages/settings/src/settings-feature-general-warning-accept-experimental.tsx:14
  • Draft comment:
    The switch logic appears inverted. While developer mode enables the switch with checked={enabled === 'true'}, here the warning switch uses checked={warningAccepted !== 'true'} and toggles with ${!checked}. Consider aligning the logic so that the switch’s checked state directly reflects the setting value.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
5. packages/db-react/src/use-account-live.tsx:8
  • Draft comment:
    Consider using the active wallet ID as a fallback. Currently, the query uses the provided 'walletId' parameter directly, even if it is undefined. Use a fallback like const idToUse = walletId ?? activeWalletId before calling accountFindByWalletId(db, idToUse).
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_m7HWilQuMksFpVMr

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

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