Skip to content

feat(config): export/import ScrapeConfiguration entity graph (#47)#49

Merged
astar-development-jb merged 5 commits into
mainfrom
feat/47-scrape-config-export-import
Jun 27, 2026
Merged

feat(config): export/import ScrapeConfiguration entity graph (#47)#49
astar-development-jb merged 5 commits into
mainfrom
feat/47-scrape-config-export-import

Conversation

@jaybarden1

@jaybarden1 jaybarden1 commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds ApplicationMetadata.Redacted constant and ScrapeConfigurationExportFilePath (~/Documents/Scrapper/ScrapeConfiguration.json)
  • Six DTO records (ScrapeConfigurationDto and children) with init properties — no EF nav-back-refs
  • ScrapeConfigurationDtoExtensions.ToDto redacts Password, SessionCookie, and ApiKey; ToDomain maps back for import
  • ScrapeConfigurationService with ExportScrapeConfigurationAsync (full Include chain) and ImportScrapeConfigurationAsync (REDACTED-skip + SearchCategory upsert-by-Id)
  • IImportExportService / ImportExportService extended with ExportScrapeConfigurationToFile and ImportScrapeConfigurationFromFile, mirroring the FileClassification pattern
  • Export Config / Import Config buttons added to MainWindow; both disabled during operation, re-enabled on completion or error
  • FilesContext.OnConfiguring guarded with if (!optionsBuilder.IsConfigured) for in-memory SQLite testability
  • ScrapeConfigurationService registered as transient in DI

Closes #47

Test plan

  • 23 new unit tests pass: 12 in GivenAnImportExportService, 11 in GivenAScrapeConfigurationService
  • All 74 tests pass (39 FunctionalParadigm + 35 Wallpaper)
  • Export Config button writes ~/Documents/Scrapper/ScrapeConfiguration.json with "REDACTED" for sensitive fields
  • Import Config button reads the file and updates the DB row in-place, preserving existing Password/SessionCookie/ApiKey when value is "REDACTED"
  • SearchCategories are upserted by string Id (new entries added, existing entries updated, absent entries retained)

🤖 Generated with Claude Code

jaybarden1 and others added 3 commits June 26, 2026 23:28
…ble rules

feat: add original C# developer guidelines file
fix: update settings.json to include 'graphify' in spell check
)

Closes #47 (tests only - no production code)
- 12 new GivenAnImportExportService tests for scrape config file I/O
- 11 new GivenAScrapeConfigurationService tests including 3 REDACTED skip tests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Closes #47

- Add ApplicationMetadata.Redacted constant and ScrapeConfigurationExportFilePath
- Add 6 DTO records (ScrapeConfigurationDto and children) with init properties
- Add ScrapeConfigurationDtoExtensions.ToDto (redacts Password/SessionCookie/ApiKey) and ToDomain
- Add ScrapeConfigurationService with ExportScrapeConfigurationAsync and ImportScrapeConfigurationAsync (REDACTED-skip + SearchCategory upsert-by-Id)
- Extend IImportExportService / ImportExportService with ExportScrapeConfigurationToFile and ImportScrapeConfigurationFromFile
- Add Export Config / Import Config buttons to MainWindow (disabled during operation)
- Guard FilesContext.OnConfiguring with if (!optionsBuilder.IsConfigured) for testability
- Register ScrapeConfigurationService in DI

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jaybarden1 jaybarden1 requested a review from a team June 27, 2026 08:26
@astar-development-jb astar-development-jb enabled auto-merge (squash) June 27, 2026 11:11
astar-development-jb and others added 2 commits June 27, 2026 19:45
- Delete stale obj/ dirs left over before Directory.Build.props moved
  output to artifacts/ — caused duplicate assembly attribute errors
- Fix ImportExportService: missing closing braces in catch block and
  method body (merge conflict artefacts)
- Rewrite MainWindow.axaml.cs: correct merge of both parents — adds
  IScrapedTagService + ScrapeConfigurationService fields/ctor params,
  all four new event handlers, IDisposable, and all buttons in
  enable/disable helpers
- Rewrite GivenAnImportExportService: correct merge combining
  classifications, scrape-config, and scraped-tag test coverage
- Fix GivenAScrapeConfigurationService: replace CancellationToken.None
  with TestContext.Current.CancellationToken (xUnit1051)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@astar-development-jb astar-development-jb merged commit 5e248ea into main Jun 27, 2026
6 checks passed
@astar-development-jb astar-development-jb deleted the feat/47-scrape-config-export-import branch June 27, 2026 19:04
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.

feat: export/import for ScrapeConfiguration

2 participants