Skip to content

refactor: rename project from frame-fab to story-weaver - #41

Merged
Agions merged 17 commits into
mainfrom
micro-optimize
Jul 8, 2026
Merged

refactor: rename project from frame-fab to story-weaver#41
Agions merged 17 commits into
mainfrom
micro-optimize

Conversation

@Agions

@Agions Agions commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • rename all references across 106 files (code, config, docs, CI, tests)
  • redesign logo: 'weaving stories' concept with thread/grid motif
  • rewrite README.md: 294 to 89 lines, remove 70% redundancy
  • simplify docs/index.md: 310 to 43 lines, pure markdown
  • update localStorage keys: framefab_* to storyweaver_*
  • update Rust constants: framefab_* to storyweaver_*
  • update GitHub workflow artifact names and issue templates
  • fix tailwind.config.ts eslint ignores gap

Motivation

trademark avoidance: project renamed to story-weaver

Agions added 17 commits July 7, 2026 15:45
BasePipelineStep 增强:
- 新增 computeCountMetric(fieldName) 辅助方法,统一 6 个步骤的数组长度指标计算
- 新增 computeNumericMetric(fieldName) 辅助方法,统一数值字段指标计算
- 新增 computeQualityGate() 钩子,RenderStep/VideoEditingStep 不再需要覆盖 execute()
- execute() 方法内联构建 StepOutput,消除对 createSuccessStepResult 的依赖
- QualityGateDecision 改为值导入(非 type),解决运行时报错

各步骤文件:
- computeMetrics 从 5-7 行缩减为 1 行(调用 computeCountMetric)
- RenderStep/VideoEditingStep 删除 30 行 execute() 覆盖代码,改用 computeQualityGate 钩子

消除 ~80 行重复代码
删除整个 core/autonomous/ 模块及 features/auto-pipeline/ 页面,
原因: loadSteps() 始终返回空数组,自审循环和质量门禁均为空壳,
整个流水线从未执行任何实际步骤,约 2500 行死代码。

同步删除:
- /auto-pipeline 路由 (app/index.tsx)
- page-preload 中的 autoPipeline 入口
- 5 个关联测试套件 (autonomous engine, self-review-loop, quality-gat)

Co-Authored-By: Claude Opus 4.6 <<EMAIL>>
将 step.interface.ts 从独立定义改为从 pipeline.types.ts (canonical) re-export,
同时保留宽松的 Record<string, unknown> StepInput/StepOutput 和扩展接口 LooosePipelineStep。

- PipelineStep/StepInput/StepOutput 等核心类型 → 统一从 pipeline.types.ts 引入
- 宽松 StepInput/StepOutput (Record) → 保留在 step.interface.ts 用于兼容
- 原 PipelineStep 扩展接口 → 重命名 LooosePipelineStep 避免命名冲突
- 服务层 pipeline.types.ts 保持独立 (execute(input, context) 签名不同)

Co-Authored-By: Claude Opus 4.6 <<EMAIL>>
- 启用 noUnusedLocals/noUnusedParameters (tsconfig strict)
- 删除 @frame-fab/common 路径别名 (packages/common 目录不存在)
- 删除 Jest 废弃的 @core/@shared moduleNameMapper
- 清理 60 处 TS6133/TS6196 错误: 删除未使用导入、移除未使用属性、
  导出待用的 _LANGUAGES/_DEFAULT_* 配置
- 修正 StoryboardCollaborationPanel 中 saveVersion 的返回值处理

Co-Authored-By: Claude Opus 4.6 <<EMAIL>>
- ThemeContext 改为通过 useSyncExternalStore 读取 settingsStore.theme,
  不再维护独立的 useState,消除与 settingsStore 的状态分裂
- 移除 main.tsx 中重复的 <ThemeProvider> 包装 (AppProvider 已提供)
- SettingsContext 删除重复的 DOM 主题操作 (已统一由 ThemeContext 处理)
- sonner.tsx 改用 @/app/providers/ThemeContext 替换 next-themes

Co-Authored-By: Claude Opus 4.6 <<EMAIL>>
将 ProjectEditPage 中每次渲染重新创建的内联步骤切换器提取为独立组件,
避免因闭包重建导致的潜在渲染性能问题,同时精简页面骨架。
- Remove dual-API design (old initialSegments/onSave/onExport + new script/metadata/onScriptUpdate)
- Unify to segments + onSegmentsChange controlled props, fix 2/3 consumers silently ignored
- VideoSegment type now imported from canonical @/shared/types/script
- Extract segment type labels to SEGMENT_TYPE_LABELS constant map
- StepScript adds local segments state for controlled mode
- File lines 518 -> ~430 (net -90)
- features/ai/components/ 整个目录是死代码 (无消费者)
- TruncatedDescription 有 1 个消费者 (shared ModelSelector), 内联到本地
- AIModelSelector (595 行) 和 ModelSelector re-export 一并移除
- 整个 features/ai/ 特性目录已废弃, 全部移除
- 7 useState 集中为 1 个 reducer (useProject.reducer.ts)
- 对外 API 完全兼容 ( setter 名 + signature 不变 )
- 消除 createProject / saveProject / resetProject 等多处非原子更新
- 遵循项目既有 useVideo.reducer 模式 (setter factory + FieldUpdater)
- state.project 通过 useReducer 闭包读取,消除 stale closure 风险
- 新增 TaskStatus 类型导入以匹配接口契约
- 覆盖 projectReducer 的 set/update/unknown action 路径
- 覆盖 createProjectSetters 工厂的 7 个 setter 生成
- 验证值模式 vs 函数 updater 模式的分发行为
- 断言 reducer 幂等性 (未知 action 返回原 state)
- 删除 script.slice.ts / video.slice.ts / export.slice.ts (无消费者)
- 移除 project.store 中 searchQuery/filterStatus/sortBy/sortOrder 等死字段
- 移除 project.store 中 loadProject/exportProject/importProject 死 action
- 移除 settings.store 中 addRecentProject/resetSettings 死 action
- 从 app.store 移除 theme 字段 (已统一到 settingsStore, 消除双源真相)
- SettingsContext 同步精简 (仅保留 settings/updateSettings)
- project.store.test 移除对应死代码断言, 新增 recentProjects 边界测试
- 删除硬编码 apiProviders 数组 (5 提供商 + emoji logo + 颜色)
- 改为从 @/core/config/models.config 动态派生 (MODEL_PROVIDERS + getModelsByProvider)
- 自动覆盖 12 提供商 (不再遗漏 Google/iFlytek/Tencent/MiniMax/Moonshot/Kling/ByteDance)
- 模型列表从 model-catalog.ts 同步, 消除维护两份数据的负担
- ScriptGenerator: add return type to buildFormValues(), remove double cast
- StepContentSwitcher: onSaveScript typed as VideoSegment[] (was unknown)
- StepScript: onSave typed as VideoSegment[] (was unknown)
- ProjectEditPage: add handleSaveScript serializing VideoSegment[] to text
- project-detail-actions: persistProjectPatch uses Partial<ProjectData>
- ProjectEditPage: remove self-mutating deps from useEffect,
  replace indirect cast with explicit field pass
- TaskStatus: add 'cancelled' to status union, remove as unknown as cast
- useVideo: leverage updated type to eliminate double cast
- Remove loadingMessage, sidebarCollapsed, currentModel (written never read)
- Remove setTheme (unified to settingsStore), setCurrentProject, setCurrentModel
- Remove toggleSidebar (no consumer)
- setLoading simplified to boolean-only signature
- Persisted state reduced to language only
- AudioEditorPanel: log + toast on write failure
- project-detail-actions: log + toast on persistence failure
- Errors now visible to user and logged for debugging
- rename all references across 105 files (code, config, docs, CI, tests)
- redesign logo: 'weaving stories' concept with thread/grid motif
- rewrite README.md: 294 to 89 lines, remove 70% redundancy
- simplify docs/index.md: 310 to 43 lines, pure markdown
- clean VitePress config (remove redundant comments)
- update localStorage keys: framefab_* to storyweaver_*
- update Rust constants: framefab_* to storyweaver_*
- update GitHub workflow artifact names and issue templates
- fix all test assertions for renamed storage keys
- add tailwind.config.ts to eslint ignores (tsconfig gap)

trademark avoidance: project renamed to story-weaver
@Agions
Agions merged commit 2bd9343 into main Jul 8, 2026
5 of 6 checks passed
@Agions
Agions deleted the micro-optimize branch July 8, 2026 07:11
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