Skip to content

Feat: Add toggle switch to enable/disable accounts from main screen#728

Merged
brafdlog merged 3 commits intomasterfrom
feature/account-toggle-checkboxes
Apr 17, 2026
Merged

Feat: Add toggle switch to enable/disable accounts from main screen#728
brafdlog merged 3 commits intomasterfrom
feature/account-toggle-checkboxes

Conversation

@brafdlog
Copy link
Copy Markdown
Owner

@brafdlog brafdlog commented Feb 7, 2026

Summary

  • Adds a hover-visible toggle switch to each importer and exporter card on the main screen
  • Users can quickly include/exclude accounts from scraping without opening the settings dialog
  • Toggle is hidden during scraping, matching the behavior of other action buttons
  • Widened account cards (200px → 260px) and container (260px → 300px) to accommodate the new toggle

Closes #713

🤖 Generated with Claude Code

@brafdlog
Copy link
Copy Markdown
Owner Author

brafdlog commented Feb 7, 2026

@dadarara feel free to try this branch and tell me if it works for you.

Copy link
Copy Markdown

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

Adds an inline enable/disable control for importer/exporter accounts on the main screen, allowing users to include/exclude accounts from scraping without opening settings (per #713), and adjusts card/container sizing to fit the new control.

Changes:

  • Added toggleImporterActive / toggleExporterActive actions to ConfigStore.
  • Added a hover-visible switch control on account cards (disabled/hidden while scraping).
  • Updated account card and container widths to accommodate the switch.

Reviewed changes

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

Show a summary per file
File Description
packages/renderer/src/store/ConfigStore.tsx Adds store actions to toggle importer/exporter active state in config.
packages/renderer/src/components/exporters/Exporters.tsx Wires exporter cards to the new toggle action (when not scraping).
packages/renderer/src/components/accounts/Importers.tsx Wires importer cards to the new toggle action (when not scraping).
packages/renderer/src/components/accounts/Account.tsx Renders a Form.Check switch on cards when onToggleActive is provided.
packages/renderer/src/components/accounts/Account.module.css Adds hover-only visibility styling for the new switch and widens the card.
packages/renderer/src/components/accounts/NewAccount.module.css Widens the “new account” card to match the updated account card width.
packages/renderer/src/components/accounts/AccountsContainer.module.css Widens the container to fit the widened cards.

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

Comment thread packages/renderer/src/components/accounts/Account.tsx
Comment thread packages/renderer/src/store/ConfigStore.tsx
Comment thread packages/renderer/src/components/exporters/Exporters.tsx Outdated
Comment thread packages/renderer/src/components/accounts/Account.tsx
Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 8, 2026

@baruchiro I've opened a new pull request, #729, to work on those changes. Once the pull request is ready, I'll request review from you.

@dadarara
Copy link
Copy Markdown

dadarara commented Feb 9, 2026

@dadarara feel free to try this branch and tell me if it works for you.

there is no window exe artifact. I am not very experienced in git. so dont know how to build and have the exe generated. :)

@github-actions
Copy link
Copy Markdown
Contributor

Pull request has been marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Apr 11, 2026
brafdlog and others added 3 commits April 17, 2026 10:15
Add a hover-visible toggle switch to each importer and exporter card,
allowing users to quickly include/exclude accounts from scraping without
opening the settings dialog. Toggle is hidden during scraping.

Closes #713

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add aria-label to toggle switch for screen reader accessibility
- Narrow Exporter.companyId to OutputVendorName to eliminate type cast

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nent (#729)

Refactor the Account component to use an explicit `disabled` prop
instead of conditionally passing `onToggleActive` based on scraping
state.

**Before:**
```tsx
<Account
  onToggleActive={!isScraping ? () => configStore.toggleImporterActive(account.id) : undefined}
/>
```

**After:**
```tsx
<Account
  onToggleActive={() => configStore.toggleImporterActive(account.id)}
  disabled={isScraping}
/>
```

**Changes:**
- Add `disabled?: boolean` prop to `AccountProps` interface
- Pass `disabled` prop to `Form.Check` toggle switch component
- Update `Importers.tsx` and `Exporters.tsx` to use the new prop pattern

<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for
you](https://github.com/brafdlog/caspion/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: baruchiro <17686879+baruchiro@users.noreply.github.com>
@brafdlog brafdlog force-pushed the feature/account-toggle-checkboxes branch from 1e88934 to 4752542 Compare April 17, 2026 07:18
@brafdlog brafdlog merged commit afa40b5 into master Apr 17, 2026
10 checks passed
@brafdlog brafdlog deleted the feature/account-toggle-checkboxes branch April 17, 2026 07:22
@brafdlog
Copy link
Copy Markdown
Owner Author

@dadarara merged, FYI

@github-actions
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.18.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@dadarara
Copy link
Copy Markdown

great work. thank you !! works very well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

individually chose accounts for processing using a checkbox

5 participants