Source: desloppify review (abstraction_fitness)
Problem
Three diagram config files (inAppFlowConfig.js, notificationFlowConfig.js, pushFlowConfig.js in src/app/docs/notifications/) repeat the same {views, flows, legend, title, description, details} shape with no shared schema or factory. Adding a new field requires editing all three files.
Similarly, three definition files (*Definition.js) repeat identical DEFINITION_LR = 'graph LR\n' + BODY / DEFINITION_TD export patterns.
Fix
- Extract a
createFlowConfig(options) factory or a @typedef for the config shape
- Extract a
buildMermaidDefinition(body) helper for the LR/TD assembly
Files
src/app/docs/notifications/inAppFlowConfig.js
src/app/docs/notifications/notificationFlowConfig.js
src/app/docs/notifications/pushFlowConfig.js
src/app/docs/notifications/inAppFlowDefinition.js
src/app/docs/notifications/notificationFlowDefinition.js
src/app/docs/notifications/pushFlowDefinition.js
Impact
Low — docs-only code, no runtime effect. Reduces maintenance surface for diagram additions.
Source: desloppify review (abstraction_fitness)
Problem
Three diagram config files (
inAppFlowConfig.js,notificationFlowConfig.js,pushFlowConfig.jsinsrc/app/docs/notifications/) repeat the same{views, flows, legend, title, description, details}shape with no shared schema or factory. Adding a new field requires editing all three files.Similarly, three definition files (
*Definition.js) repeat identicalDEFINITION_LR = 'graph LR\n' + BODY/DEFINITION_TDexport patterns.Fix
createFlowConfig(options)factory or a@typedeffor the config shapebuildMermaidDefinition(body)helper for the LR/TD assemblyFiles
src/app/docs/notifications/inAppFlowConfig.jssrc/app/docs/notifications/notificationFlowConfig.jssrc/app/docs/notifications/pushFlowConfig.jssrc/app/docs/notifications/inAppFlowDefinition.jssrc/app/docs/notifications/notificationFlowDefinition.jssrc/app/docs/notifications/pushFlowDefinition.jsImpact
Low — docs-only code, no runtime effect. Reduces maintenance surface for diagram additions.