Skip to content

feat(import): Add per-entity auto-create controls and validation#71

Merged
nfebe merged 1 commit intodevfrom
feat/import-auto-create-config
Apr 13, 2026
Merged

feat(import): Add per-entity auto-create controls and validation#71
nfebe merged 1 commit intodevfrom
feat/import-auto-create-config

Conversation

@nfebe
Copy link
Copy Markdown
Contributor

@nfebe nfebe commented Apr 13, 2026

Import confirmation dialog now shows checkboxes for creating new wallets, parties, and categories, disabled by default. The review table highlights rows with unresolved wallets in red and marks new entities with a (new) label in dropdowns.

Shared data is refreshed after successful imports so re-importing doesn't incorrectly flag entities as new. Error messages are deduplicated for cleaner display.

@sourceant
Copy link
Copy Markdown

sourceant bot commented Apr 13, 2026

Code Review Summary

The PR introduces a robust validation and auto-creation mechanism for imports. It adds UI controls to allow users to opt-in to creating new entities (wallets, parties, categories) and visual feedback for invalid rows.

🚀 Key Improvements

  • Added AutoCreateOptions to the import confirmation flow.
  • Implemented visual feedback (row--invalid) for transactions missing required entities.
  • Dynamic refreshing of shared data (wallets, categories) after successful import to keep the local state in sync.

💡 Minor Suggestions

  • Add tooltips to disabled confirm buttons.
  • Standardize error message cleaning regex.

Copy link
Copy Markdown

@sourceant sourceant bot left a comment

Choose a reason for hiding this comment

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

Review complete. See the overview comment for a summary.

Comment thread composables/useImports.ts
Comment thread pages/imports.vue
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Apr 13, 2026

Deploying trakli-dev with  Cloudflare Pages  Cloudflare Pages

Latest commit: a5bc3e0
Status: ✅  Deploy successful!
Preview URL: https://d48c046e.trakli-dev.pages.dev
Branch Preview URL: https://feat-import-auto-create-conf.trakli-dev.pages.dev

View logs

Import confirmation dialog now shows checkboxes for creating new
wallets, parties, and categories, disabled by default. The review table
highlights rows with unresolved wallets in red and marks new entities
with a (new) label in dropdowns.

Shared data is refreshed after successful imports so re-importing
doesn't incorrectly flag entities as new. Error messages are
deduplicated for cleaner display.
@nfebe nfebe force-pushed the feat/import-auto-create-config branch from 305a1fd to a5bc3e0 Compare April 13, 2026 21:27
Copy link
Copy Markdown

@sourceant sourceant bot left a comment

Choose a reason for hiding this comment

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

Review complete. See the overview comment for a summary.

<button class="btn btn--primary" :disabled="isConfirming" @click="$emit('confirm')">
<button
class="btn btn--primary"
:disabled="isConfirming || walletRequired"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Preventing submission when wallets are required but not checked is good, but consider also showing a tooltip or more visible feedback if the button is disabled to improve UX.

Suggested change
:disabled="isConfirming || walletRequired"
:disabled="isConfirming || walletRequired" :title="walletRequired ? t('Please select Create new wallets to continue') : ''"

"
>
<option value="">--</option>
<option v-if="isNewParty(suggestion.party)" :value="suggestion.party!">
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The '(new)' option is added at the top of the dropdown. To maintain a consistent UI, ensure this option doesn't duplicate if the user manually selects the same name. Also, consider styling this option specifically to distinguish it from the rest of the list.

Suggested change
<option v-if="isNewParty(suggestion.party)" :value="suggestion.party!">
<option v-if="isNewParty(suggestion.party)" :value="suggestion.party!" class="text-warning">
{{ suggestion.party }} ({{ t('new') }})
</option>

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

Deploying webui with  Cloudflare Pages  Cloudflare Pages

Latest commit: a5bc3e0
Status: ✅  Deploy successful!
Preview URL: https://5bc31289.webui-9fh.pages.dev
Branch Preview URL: https://feat-import-auto-create-conf.webui-9fh.pages.dev

View logs

@nfebe nfebe merged commit 42f238d into dev Apr 13, 2026
5 checks passed
@nfebe nfebe deleted the feat/import-auto-create-config branch April 13, 2026 21:36
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