Skip to content

Initial release: NextIteration.SpectreConsole.Settings 0.1.0#1

Merged
StuartMeeks merged 3 commits into
mainfrom
feat/initial-package
May 27, 2026
Merged

Initial release: NextIteration.SpectreConsole.Settings 0.1.0#1
StuartMeeks merged 3 commits into
mainfrom
feat/initial-package

Conversation

@StuartMeeks

Copy link
Copy Markdown
Owner

Initial implementation of NextIteration.SpectreConsole.Settings — strongly-typed, JSON-persisted settings for Spectre.Console CLI tools. Sibling to NextIteration.SpectreConsole.Auth, mirroring its structure, packaging, and quality bar (net10.0, TreatWarningsAsErrors, docs on, SourceLink, snupkg).

What's included

  • SettingsBase — field-backed properties + OnPropertyChanged(). Inert until bound at load, so deserializer setters never trigger a write.
  • PersistenceModeAutomatic (debounced async write, 250 ms default, configurable) / Explicit (Save() / SaveAsync()). Fire-and-forget write failures route to a configurable error handler, never swallowed.
  • AddSettings<T>() — DI registration with required-SettingsDirectory validation; one {ClassName}.json per class; per-class singletons resolve through ISettingsStore so an in-place reset is observed by injected references.
  • Tolerant JSON — atomic writes (temp-file + rename), missing→default, unknown ignored, case-insensitive, string enums.
  • settings branchlist and reset (<class> and --all) via AddSettingsBranch(); all commands honour -v/--verbose.
  • Package icon + editable SVG source under design/icons/.

Quality

  • 22 xUnit tests: load-on-missing-file, automatic persistence + round-trip, explicit persistence, debounce coalescing, reset / reset-all, tolerant deserialisation, atomic writes, error surfacing.
  • Release build clean: 0 warnings, 0 errors. Fully XML-documented public surface.

Not in scope here

  • No release tag. 0.1.0 is marked Unreleased in the CHANGELOG; publishing is gated on pushing a v* tag, intentionally not done yet.

Note: main was bootstrapped from an empty baseline commit so this initial work could come through a PR; merging brings the full package onto main.

🤖 Generated with Claude Code

StuartMeeks and others added 3 commits May 27, 2026 04:00
Strongly-typed, JSON-persisted settings for Spectre.Console CLI tools,
a sibling package to NextIteration.SpectreConsole.Auth mirroring its
project structure, packaging, and quality standards (net10.0,
TreatWarningsAsErrors, docs on, SourceLink, snupkg).

Core:
- SettingsBase: field-backed properties + OnPropertyChanged(); inert
  until bound at load so deserializer setters never write.
- PersistenceMode Automatic (debounced async write, 250ms default) /
  Explicit (Save()/SaveAsync()). Fire-and-forget failures surface via a
  configurable error handler, never swallowed.
- AddSettings<T>() DI extension with required-SettingsDirectory
  validation; one {ClassName}.json per class; singletons resolve through
  ISettingsStore so in-place resets are observed by injected references.
- Tolerant JSON: atomic writes, missing->default, unknown ignored,
  case-insensitive, string enums.
- settings list / reset (<class> and --all) via AddSettingsBranch();
  all commands honour -v/--verbose.

Tests: 22 xUnit tests (load-on-missing-file, automatic persistence +
round-trip, explicit persistence, debounce coalescing, reset/reset-all,
tolerant deserialisation, atomic writes, error surfacing).

Note: src/.../icon.png is a placeholder (copy of the Auth package icon)
pending a dedicated package icon.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replace the placeholder (copied from the Auth package) with the
dedicated NextIteration.SpectreConsole.Settings icon: a 512x512 RGBA PNG
(green gear over a stacked-database mark), consistent with the icon
family across the sibling packages.

The editable source vector is kept under design/icons/.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The 0.1.0 section was dated and linked to a release tag that doesn't
exist yet — the package isn't being released at this point. Mark it
Unreleased, point the link at the repo tree, and record the package
icon in the initial-release notes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@StuartMeeks StuartMeeks merged commit 73e3b99 into main May 27, 2026
2 checks passed
@StuartMeeks StuartMeeks deleted the feat/initial-package branch May 27, 2026 04:06
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