Phase 3: config packs (config-only, one-click apply) - #53
Merged
Conversation
Second Phase 3 item, building on import/export (#52). Ships curated config-only bundles users apply in one click, and the same format works for community packs. - ConfigPack (OpenWhispCore): a ConfigBundle + display metadata (id/name/ description). Decodes with the same schema-version guard as a hand-imported file; "description" JSON key maps to packDescription. Pure ConfigPack.parseAll parses a directory listing into valid packs (sorted by name, deduped by id, malformed/too-new files skipped so a bad pack never hides the good ones). - Two built-in packs in Resources/packs: Developer Vocabulary (dev terms + mishear fix-ups) and Punchy Telegram Posts (shorter telegramPost prompt). package.sh already copies Resources/* into the bundle. - AppState: bundledConfigPacks() reads Resources/packs/*.json (delegates parsing to ConfigPack.parseAll) and applyPack() routes through the existing applyConfig. - SettingsView: a Packs subsection under Backup & Sharing listing each pack with its description + what it will change, and an Apply button. - Tests: +9 ConfigPackTests incl. parseAll sort/dedup/skip-bad AND a test that loads the SHIPPED pack files so an authoring typo fails CI. 147 -> 156. - README + ROADMAP updated. swift test 156/156; ./build.sh clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second Phase 3 item, building on import/export (#52). Ships curated config-only bundles users apply in one click — and the same format works for community packs.
Changes
ConfigPack(OpenWhispCore): aConfigBundle+ display metadata (id/name/description). Same schema-version guard as a hand-imported file. PureConfigPack.parseAllturns a directory listing into valid packs — sorted by name, deduped by id, with malformed/too-new files skipped so a bad pack never hides the good ones.Resources/packs/: Developer Vocabulary (dev terms + mishear fix-ups) and Punchy Telegram Posts (a shortertelegramPostprompt).package.shalready bundlesResources/*.bundledConfigPacks()readsResources/packs/*.json(parsing delegated to the pure helper);applyPack()routes through the existingapplyConfigimport path, so a pack only touches the sections it contains.ConfigPackTests—parseAllsort/dedup/skip-bad, version/malformed guards, and a test that loads the shipped pack files so an authoring typo fails CI rather than a user's import. 147 → 156.swift test156/156 ·./build.shclean.🤖 Generated with Claude Code