Skip to content

fix(config): remove hardcoded Debug paths — thumbnails + Freeplane/FreeMind (#283) - #284

Merged
jsboige merged 1 commit into
masterfrom
fix/283-audit-hardcoded-paths
May 16, 2026
Merged

fix(config): remove hardcoded Debug paths — thumbnails + Freeplane/FreeMind (#283)#284
jsboige merged 1 commit into
masterfrom
fix/283-audit-hardcoded-paths

Conversation

@jsboige

@jsboige jsboige commented May 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • ThumbnailsPathExpression (3 files): Replace hardcoded ../../bin/Debug/netcoreapp3.1/Target/... with Target/... — the path now resolves correctly in both Debug and Release builds
  • FreeplanePath / FreeMindPath: Change from machine-specific paths (C:\Users\MYIA\...) to empty string defaults — configurable via JSON, existing guard (string.IsNullOrEmpty + !File.Exists) ensures graceful skip

Before

// MindMapDocumentConfig.cs:172 (same in Fallacy + Virtue variants)
public string ThumbnailsPathExpression { get; set; } = @"../../bin/Debug/netcoreapp3.1/Target/Images/...";
// AssetConverterConfig.cs:244-245
public string FreeplanePath { get; set; } = @"C:\Users\MYIA\AppData\Local\Programs\Freeplane\freeplane.exe";
public string FreeMindPath { get; set; } = @"C:\Program Files (x86)\FreeMind\FreeMind.exe";

After

// Works from both bin/Debug/net9.0 and bin/Release/net9.0
public string ThumbnailsPathExpression { get; set; } = @"Target/Images/density-0/Fallacies-Web-Thumbnails/...";
// Empty defaults — user sets via JSON config or environment
public string FreeplanePath { get; set; } = "";
public string FreeMindPath { get; set; } = "";

Test plan

  • dotnet build — 0 error
  • dotnet test — 120 pass / 0 fail / 5 skip
  • Mind map generation with thumbnails still resolves paths correctly (functional test post-merge)

Fixes HIGH items #1-5 from issue #283. Parent: Epic #278.

🤖 Generated with Claude Code

…eeMind

- ThumbnailsPathExpression: replace `../../bin/Debug/netcoreapp3.1/Target/...` with `Target/...` (works in both Debug and Release builds)
- FreeplanePath/FreeMindPath: change from machine-specific paths (C:\Users\MYIA\...) to empty defaults (configurable via JSON, graceful skip when not found)

Fixes #283 (HIGH items 1-5). Build: 0 error, tests: 120 pass / 0 fail.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@myia-ai-01

Copy link
Copy Markdown

LGTM ✅

Review summary:

  • ThumbnailsPathExpression (3 files) — Target/... resolves correctly relative to exe working dir (bin/<Config>/net9.0-windows/) in both Debug and Release. Old ../../bin/Debug/netcoreapp3.1/... was triple-wrong (relative, hardcoded Debug, wrong TFM).
  • FreeplanePath empty default — verified no .cs consumer (dead config, change is purely cosmetic, zero functional impact).
  • FreeMindPath empty default — guarded by string.IsNullOrEmpty(freemindPath) || !File.Exists(freemindPath) at FallacyMindMapDocumentConfig.cs:558 → LogWarning + skip. Safe.
  • Tests already use FreeMindPath = "" / FreeplanePath = "" (Tests/MindmapGeneration/*.cs) — convention preserved.

Validation locale:

  • dotnet build : 0 erreur (17 warnings préexistants, non liés)
  • dotnet test : 120 réussis / 0 échec / 5 ignorés

Note encoding: Le diff ajoute un BOM au début de FallacyMindMapDocumentConfig.cs — harmless mais à surveiller pour cohérence future (PR séparée si on veut normaliser).

Merge en --squash pour clôturer issue #283 et avancer Task 3 d'Epic #278.

@myia-ai-01

Copy link
Copy Markdown

⚠️ Merge bloqué côté ai-01 — GraphQL: myia-ai-01 does not have the correct permissions to execute MergePullRequest.

Testé --squash, --merge, --rebase : tous échouent avec la même erreur. Curieux car PR #281 et #282 ont mergé sans souci ce matin (c4458b40, 7abd4e0a). Permission GraphQL intermittente, peut-être un toggle org-level entre temps.

Action requested @jsboige : merger en --squash quand tu peux. La PR est LGTM (build clean, 120 tests OK, review ci-dessus).

Je continue avec validation PDF visuelle #247/#249/#252 en parallèle.

@jsboige
jsboige merged commit 5213339 into master May 16, 2026
1 check passed
@jsboige
jsboige deleted the fix/283-audit-hardcoded-paths branch June 1, 2026 21:42
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.

2 participants