chore(rebrand): phase 4c — remaining source strings, storage keys and identifiers#145
Conversation
|
Skipping CodeAnt AI review — this PR changes more than 100 files, which usually means a migration, codemod, or vendored drop. Line-level review on diffs this large produces duplicate findings on the same rewrite pattern and drowns out anything that actually matters. If you still want a review, comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@CodeAnt-AI review |
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
Sequence DiagramThis PR completes the rebrand by standardizing the adaptive AI engine gate on a WorldScript-specific window flag, showing how feature flag changes control local AI behavior through listener middleware and the local AI facade. sequenceDiagram
participant User
participant App
participant AdaptiveListener
participant Window
participant LocalAIEngine
User->>App: Enable adaptive AI in settings
App->>AdaptiveListener: Feature flag enableAdaptiveAiEngine updated
AdaptiveListener->>Window: Set worldscript adaptive ai flag to true
AdaptiveListener->>AdaptiveListener: Generate local device profile
User->>App: Request local text generation
App->>LocalAIEngine: generateLocalText(prompt)
LocalAIEngine->>Window: Read worldscript adaptive ai flag
alt Adaptive flag is true
LocalAIEngine->>LocalAIEngine: Use adaptive task configuration
else Adaptive flag is false
LocalAIEngine->>LocalAIEngine: Use default local model configuration
end
Generated by CodeAnt AI |
… brand value - Accessibility CSS broke: App.tsx emits worldscript-* classes but index.css still targeted .storycraft-* — reduced-motion, large-text, screen-reader and focus-indicators silently stopped working. Rename the 4 a11y selectors to worldscript-* (the unrelated storycraft-driver-popover tour selectors are left as-is since that class was not renamed). - Introduce constants/brand.ts (APP_NAME, APP_FILE_SLUG) as the single source for the product name + filesystem slug, and use it for the previously-hardcoded brand text (CommandPalette footer, Settings About heading) and export filenames (LoRA dataset, library backup, settings export). Brand strings stay out of the i18n catalog by design — a product name is identical across locales and must never be accidentally translated. - Persisted storage identifiers (IDB DB names, lockout/onboarding/language keys) keep their worldscript-* names: this is a pre-release rebrand with no existing users, so there is no legacy state to migrate. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@CodeAnt-AI review |
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
Sequence DiagramThis diagram shows how the app now uses WorldScript-specific storage identifiers and centralized brand constants when persisting user data and generating export files, replacing the previous StoryCraft naming while keeping the core flows the same. sequenceDiagram
participant User
participant App
participant BrandConstants
participant BrowserStorage
User->>App: Change settings and project data
App->>BrowserStorage: Save state using worldscript-* keys and DB names
User->>App: Request backup or dataset export
App->>BrandConstants: Read APP_FILE_SLUG and APP_NAME
App->>BrowserStorage: Build export files with worldscript-prefixed filenames
App-->>User: Download WorldScript backup and settings files
Generated by CodeAnt AI |
…148) Three docs described stale or incorrect rebrand details: - V1.23-REBRAND-SMOKE-TEST R.8 claimed a feature-flag key "migration"; there is none. Restate as: flags persist under `worldscript-feature-flags` (pre-release, no legacy migration). - CHANGELOG claimed the key was "migrated" and that IDB DB names + CSS class tokens "remain unchanged for migration compatibility". With no existing users the rebrand renames them forward to `worldscript-*` (the storycraft-driver-popover tour token is the one intentionally-unchanged token). Restate accordingly. - TAURI-CI referenced a non-existent `app.deepLink.protocols` config path; the actual key is `plugins.deep-link.desktop.schemes` (now registering both `worldscript://` and legacy `storycraft://`). This phase (docs/CI) merges last, after #142/#144/#145 land the code rebrand, so the runbooks validate against fully-rebranded main. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Same fix as #146: community templates dispatched a `*:applyTemplate` window event with no listener anywhere, so applying one was a silent no-op. Add applyCommunityTemplate to useTemplateView (setManuscript/setOutline + navigate, mirroring the built-in-template path) and call it from CommunityTab, removing the dead event. New unit test covers the section→content mapping. (Both branches carry the identical fix; the merge reconciles trivially.) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@CodeAnt-AI review |
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
Sequence DiagramThis PR fixes the Community templates Apply action so it now directly creates a project from the selected template via Redux and navigates to the manuscript view, instead of dispatching an unused window event. sequenceDiagram
participant User
participant CommunityTab
participant TemplateView
participant Store
participant AppView
User->>CommunityTab: Click Apply on community template
CommunityTab->>TemplateView: applyCommunityTemplate(template)
TemplateView->>Store: setManuscript and setOutline from template
TemplateView->>AppView: Navigate to manuscript view
Store-->>AppView: Updated project state
AppView-->>User: Show manuscript populated from template
Generated by CodeAnt AI |
These changes now live in phase 4b to keep the TS bridge and Rust commands consistent within one PR. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The branch had a half-applied rename that broke typecheck (red CI): fetchAdapter exported createWorldScriptFetch and 4 test files already used it, but services/ai/index.ts, providerFactory.ts and storyCraftAi.test.ts still imported the old createStoryCraftFetch; likewise providerFactory.test.ts expected createLanguageModelForWorldScript while the source still defined the StoryCraft name. Complete both renames forward (createStoryCraftFetch → createWorldScriptFetch, createLanguageModelForStoryCraft → createLanguageModelForWorldScript) across the 5 laggard files. Pure internal-symbol rename — all 67 affected AI tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… brand value - Accessibility CSS broke: App.tsx emits worldscript-* classes but index.css still targeted .storycraft-* — reduced-motion, large-text, screen-reader and focus-indicators silently stopped working. Rename the 4 a11y selectors to worldscript-* (the unrelated storycraft-driver-popover tour selectors are left as-is since that class was not renamed). - Introduce constants/brand.ts (APP_NAME, APP_FILE_SLUG) as the single source for the product name + filesystem slug, and use it for the previously-hardcoded brand text (CommandPalette footer, Settings About heading) and export filenames (LoRA dataset, library backup, settings export). Brand strings stay out of the i18n catalog by design — a product name is identical across locales and must never be accidentally translated. - Persisted storage identifiers (IDB DB names, lockout/onboarding/language keys) keep their worldscript-* names: this is a pre-release rebrand with no existing users, so there is no legacy state to migrate. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Same fix as #146: community templates dispatched a `*:applyTemplate` window event with no listener anywhere, so applying one was a silent no-op. Add applyCommunityTemplate to useTemplateView (setManuscript/setOutline + navigate, mirroring the built-in-template path) and call it from CommunityTab, removing the dead event. New unit test covers the section→content mapping. (Both branches carry the identical fix; the merge reconciles trivially.) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
e538b4b to
d65da30
Compare
…148) Three docs described stale or incorrect rebrand details: - V1.23-REBRAND-SMOKE-TEST R.8 claimed a feature-flag key "migration"; there is none. Restate as: flags persist under `worldscript-feature-flags` (pre-release, no legacy migration). - CHANGELOG claimed the key was "migrated" and that IDB DB names + CSS class tokens "remain unchanged for migration compatibility". With no existing users the rebrand renames them forward to `worldscript-*` (the storycraft-driver-popover tour token is the one intentionally-unchanged token). Restate accordingly. - TAURI-CI referenced a non-existent `app.deepLink.protocols` config path; the actual key is `plugins.deep-link.desktop.schemes` (now registering both `worldscript://` and legacy `storycraft://`). This phase (docs/CI) merges last, after #142/#144/#145 land the code rebrand, so the runbooks validate against fully-rebranded main. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
#145 wave-3) App.tsx applies the `worldscript-reduced-motion` body class, but styles/motion.css still gated its 8 component enter/exit animations on `.storycraft-reduced-motion`, so enabling reduced-motion did not actually disable them. Rename the selectors to `.worldscript-reduced-motion` (companion to the index.css selectors fixed in wave-1). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@CodeAnt-AI review |
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
Sequence DiagramThis diagram shows how applying a community template now directly creates a new project and navigates to it via the template view hook and Redux, replacing the previous no-op window event. sequenceDiagram
participant User
participant CommunityTemplates
participant TemplateView
participant Store
participant App
User->>CommunityTemplates: Click Apply on community template
CommunityTemplates->>TemplateView: applyCommunityTemplate(selectedTemplate)
TemplateView->>Store: Set manuscript and outline from template sections
Store-->>TemplateView: Project state updated
TemplateView->>App: Request navigation to manuscript view
App-->>User: Show new project in manuscript editor
Generated by CodeAnt AI |
…#145) The applyCommunityTemplate test added a `biome-ignore noExplicitAny` (`call: any[]`) which bumped the suppression ratchet 52→53 and failed the Quality Gate. Refactor the dispatch-call lookup to `unknown[]` + a narrow cast so no suppression is needed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* chore(rebrand): phase 4a — rename AI hooks and completion fetch to WorldScript identifiers * fix(ai): align phase 4a with WorldScript identifiers - Add WorldScript aliases in fetchAdapter.ts so providerFactory and the barrel can import createWorldScriptFetch / WorldScriptFetchOptions. - Update providerFactory.test.ts to use createLanguageModelForWorldScript and mock createWorldScriptFetch. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * test(rebrand): use a deterministic fake fetch in providerFactory mock CodeAnt (test-determinism rule): the createWorldScriptFetch mock returned the real globalThis.fetch, coupling the suite to runtime network behaviour. Return a deterministic vi.fn fake instead. No assertion depends on the returned value (the factory only passes it through to the SDK; it is never invoked in-test). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(rebrand): correct stale useStoryCraftAI file pointer in feature catalog (#143) featureCatalog.ts referenced the renamed hook by its old path 'hooks/useStoryCraftAI.ts'. Update to 'hooks/useWorldScriptAI.ts'. This was the only remaining reference to the old StoryCraft AI identifiers — the hook/fetch rename is otherwise complete (zero code importers of the legacy names). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(rebrand): drop broken vestigial fetchAdapter alias after #145 merge Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
…ript (#146) * chore(rebrand): phase 4d — rebrand UI components StoryCraft → WorldScript * fix(components): localize brand strings and preserve IDB lockout state across rebrand - Add i18n key and use it in GeneralSections and CommandPalette instead of hardcoded 'WorldScript Studio'. - Migrate legacy localStorage keys in IdbUnlockModal so existing lockout state survives the rebrand. - Update GeneralSections test mock to resolve the new product-name key. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(components): align cross-component storage keys and reduced-motion class - useSettingsView now reads/removes worldscript-settings-category to match BackupQuickActionsCard. - PlotCanvas reverts to storycraft-reduced-motion class to match App.tsx toggle and motion.css rules. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(rebrand): wire community-template apply + harden IdbUnlock readInt (#146) - Community templates were a silent no-op: TemplateView dispatched a `*:applyTemplate` window event that has no listener anywhere (pre-existing on main, the rebrand only renamed the prefix). Add `applyCommunityTemplate` to useTemplateView — it builds the manuscript/outline from the community sections and dispatches setManuscript/setOutline + navigates, mirroring the working built-in-template path — and call it from CommunityTab, removing the dead window event. New unit test covers the section→content mapping. - IdbUnlockModal.readInt: corrupt/non-numeric localStorage values parsed to NaN and poisoned the lockout math (Date.now() + NaN) and countdown UI. Normalize any invalid parse to 0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * test(rebrand): assert exact product name in About section (#146 wave-2) The about-section assertion used a permissive /WorldScript/i substring match, so a regression that dropped "Studio" or rendered a different WorldScript-containing label would still pass. Assert the exact `WorldScript Studio` display string. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(rebrand): community-template guidance goes into prompt, not content (#146 wave-3) applyCommunityTemplate wrote each section's description into the manuscript `content` (with an injected `# heading`), making a freshly applied template look pre-written. Move the guidance into `prompt` (the writing brief) and start the manuscript content empty — mirroring the built-in-template path. Test updated to assert content is empty and the guidance lands in prompt. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * test(rebrand): drop new biome-ignore in template test — use unknown[] (#146) Same suppression-ratchet fix as #145: the applyCommunityTemplate test's `call: any[]` biome-ignore bumped the count 52→53 and failed the Quality Gate. Refactor the dispatch-call lookup to `unknown[]` + a narrow cast. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(rebrand): clamp IdbUnlock readInt to a safe range (#146 wave-5) readInt only rejected NaN, so a corrupt/huge stored value produced a far-future lockout timestamp that blocked unlock indefinitely. Add a per-caller max clamp: the lockout timestamp is bounded to now + 60s (the lockoutMs backoff cap) and the attempt counter to a small max, so a corrupt value can never permanently lock out. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(rebrand): lockout validity check + version assertion (#146 wave-6) - getLockoutUntil clamped to a MOVING `now + MAX_LOCKOUT_MS` on every read, so a corrupt far-future timestamp re-clamped to "now+60s" each tick and never counted down — a permanent lockout. Treat a beyond-bound value as invalid → 0 (no lockout). - GeneralSections "renders app version information" test only asserted the product name; add an assertion that packageJson.version actually renders, so a version regression fails the test as its name implies. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* docs(rebrand): Phase 7 docs + Phase 8 CI/CD — complete StoryCraft → WorldScript rebrand - Rebranded all forward-facing documentation, issue templates, and workflow comments. - Renamed smoke-test protocol V1.22 → V1.23-REBRAND-SMOKE-TEST.md with rebrand-specific checks. - Updated GitHub Actions CI VRT serve path to /WorldScript-Studio/ and docker.yml pull comment. - Updated .github/best-practices-badge.yml security policy URL and issue template descriptions. - Forward-updated GitHub URLs in docs/history/ sprint handoffs. - Regenerated .mcp/proforge-mcp-server/package-lock.json for @worldscript scope. - Updated metadata.json app name to WorldScript Studio. - Added scripts/rebrand-docs.mjs helper for documentation mass-rebrand. * docs(rebrand): align AGENTS.md and README.md version badges to v1.23.0 * fix(rebrand): update remaining StoryCraft references in help locale fixtures * chore(rebrand): remove VRT path change from phase 7-8 The /WorldScript-Studio/ VRT path update now lives in phase 1-3 (PR #142) to keep playwright.config.ts and the workflow aligned in one PR. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs(rebrand): clarify changelog scope and fix Tauri-CI file extension - Soften CHANGELOG claim from 'complete rename' to 'rename ... across user-facing code' and note legacy storage keys/CSS tokens stay unchanged. - docs/TAURI-CI.md: .scst -> .wsst to match tauri.conf.json fileAssociations. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs(rebrand): correct rebrand claims for the no-migration end state (#148) Three docs described stale or incorrect rebrand details: - V1.23-REBRAND-SMOKE-TEST R.8 claimed a feature-flag key "migration"; there is none. Restate as: flags persist under `worldscript-feature-flags` (pre-release, no legacy migration). - CHANGELOG claimed the key was "migrated" and that IDB DB names + CSS class tokens "remain unchanged for migration compatibility". With no existing users the rebrand renames them forward to `worldscript-*` (the storycraft-driver-popover tour token is the one intentionally-unchanged token). Restate accordingly. - TAURI-CI referenced a non-existent `app.deepLink.protocols` config path; the actual key is `plugins.deep-link.desktop.schemes` (now registering both `worldscript://` and legacy `storycraft://`). This phase (docs/CI) merges last, after #142/#144/#145 land the code rebrand, so the runbooks validate against fully-rebranded main. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs(rebrand): fix desktop file-extension inconsistency in smoke test (#148 wave-4) Step 7.5 referenced `.worldscript`/`.scst` — the old short extension. R.5/R.6 (and the #144 handler) use `.wsst`. Align 7.5 to `.worldscript`/`.wsst`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs(rebrand): align systemd units + AGENTS file-assoc with WorldScript (#148) - AGENTS.md listed Tauri file associations as `.worldscript`/`.scst`; the runtime registers `.worldscript`/`.wsst`. Fix the short extension. - Low-end-CI docs referenced `worldscript-*.timer` units, but the actual systemd unit files were still `storycraft-*`, so the documented `systemctl enable` commands pointed at non-existent units. Rename the 5 unit files + their internal references + install-systemd-units.sh to `worldscript-*`, matching the docs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * chore(rebrand): complete low-end-CI infra rename to worldscript (#148) The low-end-CI infra still used storycraft identifiers — docker container (storycraft-forgejo), data paths (~/storycraft-ci), env vars (STORYCRAFT_CI_HOME), and service references in the eco/optimization scripts (which broke after the systemd unit files were renamed to worldscript-*). Rebrand all 20 affected infra files to worldscript so the documented commands (docker logs worldscript-forgejo, systemctl … worldscript-forgejo.service) match the actual runtime. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
User description
Summary
Part of the StoryCraft → WorldScript rebrand split. This PR sweeps the remaining source strings, test fixtures, worker scripts and type identifiers.
Changes
types.tsand related type definitions.Scope
Related
CodeAnt-AI Description
Finish the WorldScript rebrand and make community templates create projects
What Changed
Impact
✅ Consistent WorldScript branding across the app✅ Fewer broken saved settings after the rebrand✅ Community templates now open as new projects💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.