MSD architecture cleanup: documentation and performance instrumentation guard#9
Closed
Copilot wants to merge 2 commits intomsd-globalisationfrom
Closed
MSD architecture cleanup: documentation and performance instrumentation guard#9Copilot wants to merge 2 commits intomsd-globalisationfrom
Copilot wants to merge 2 commits intomsd-globalisationfrom
Conversation
…ion improvements Co-authored-by: snootched <11273374+snootched@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Create issue for MSD architecture cleanup findings
MSD architecture cleanup: documentation and performance instrumentation guard
Nov 26, 2025
snootched
added a commit
that referenced
this pull request
Mar 29, 2026
… template support - Gauge memoization hash: add classifiedState, resolvedMarkerValues, resolvedRangeBounds so state-driven range colors and template-bound range extents correctly bust the cache - Per-band pill opacity (#12): add getRangeOpacity() alongside getPillColor() in _generatePillsSVG(); embed resolved opacity as data-unfilled-opacity on each pill rect; _updatePillOpacities() reads per-pill opacity so band-specific opacity values are honoured during live updates - Attribute template support (#9): new _resolveControlAttribute() method handles {entity.attributes.xxx}, {entity.state}, and [[[JS]]] templates; used in _getEntityValue() so the slider can read from a dynamically-resolved attribute name - Open GitHub issue #309 for Group 7 #10 drag interaction visual state (deferred)
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.
Deep analysis identified 8 optimization opportunities in MSD codebase. Addresses documentation gaps and adds performance guard for debug instrumentation.
HIGH Priority
Global card instance references (lcards-msd.js) - Documented the 3 global references, marked legacy ones deprecated, identified canonical reference
window.lcards.debug.msd.cardInstancePerformance instrumentation guard (SystemsManager.js) - Skip instrumentation in production:
MEDIUM Priority
StyleResolver two-phase init (PipelineCore.js) - Documented circular dependency pattern: Phase 1 creates without ThemeManager, Phase 2 patches after SystemsManager init
Selective re-rendering TODO (SystemsManager.js) - Expanded with implementation plan for per-overlay re-render capability
Card registration failure (PipelineCore.js) - Documented non-fatal nature and which features are disabled
LOW Priority
Original prompt
I'll create a comprehensive issue documenting all the findings from the deep analysis with actionable tasks for an agent to address. Let me try creating the issue with the complete details:Let me create a comprehensive issue with all the findings and recommendations from the deep analysis:I'll create a comprehensive GitHub issue with all the findings from the deep analysis. Let me format this properly:
GitHub Issue: MSD Architecture Cleanup - Optimization Opportunities
🎯 Overview
Deep analysis of MSD codebase confirms successful refactoring (legacy code removed, singleton architecture implemented, SimpleCards integrated). However, identified 10 optimization opportunities for improved maintainability and performance.
Status: ✅ MSD codebase is production-ready and clean
Priority: Address HIGH priority items before next feature development
Estimated Effort: ~4-6 hours total
✅ Architecture Validation Results
CONFIRMED CLEAN:
🔴 HIGH PRIORITY Issues (Fix Before Next Feature)
1. Audit Global Card Instance References
File:
src/cards/lcards-msd.jslines 1084-1089Issue: Three different global references to the same card instance:
Problems:
cb_prefix suggests legacy code remnantRecommendation:
Questions for Maintainer:
cb_lcars_card_instanceand_currentCardInstance?2. Performance Instrumentation Always Active
File:
src/msd/pipeline/SystemsManager.jslines 454-492Issue: Performance counters run in production even when not needed:
Impact:
Recommendation:
3. Document Empty
render()MethodFile:
src/msd/pipeline/SystemsManager.jslines 449-452Issue: Empty method with vague comment:
Problems:
Recommendation:
🟡 MEDIUM PRIORITY Issues (Next Sprint)
4. StyleResolver Two-Phase Initialization
File:
src/msd/pipeline/PipelineCore.jslines 45-76 and 96-104Issue: StyleResolver created before ThemeManager, then manually patched: