Page:
Developer Guidelines
No results
1
Developer Guidelines
dallasgroot edited this page 2026-04-08 16:35:40 -07:00
Developer Guidelines
Before contributing or modifying the codebase, strictly adhere to the following rules:
Visualizer Constraints
- DO NOT refactor
WavePhysicsorCanvasrendering: TheMitsuhaVisualizerViewis heavily optimized using Catmull-Rom splines, touch ripples, temporal viscosity, and phase-shifted depth shadows. Modifications will degrade performance and visual quality. - WaveStateCache Continuity: Rely on
WaveStateCacheandmatchedGeometryEffect(id: "visWave")to morph the wave instead of cutting.
State & Lifecycle Rules
- DO NOT make
AudioPlayer.currentTimeorduration@Published: This will trigger 10Hz full-view-hierarchy rerenders. Leaf views must poll via localTimer.publish. - Silence Markers are Inverted:
silence_startrepresents where trailing silence begins.silence_endrepresents where leading silence ends. - Navidrome Virtual Paths:
song.pathis an ID3-derived virtual string, not a reliable 1:1 filesystem path. Use the Companion API's 4-tier resolution strategy for file lookups. - Album Grouping: Navidrome groups albums by
album_artist, notartist.
UI & Apple Framework Guidelines
- No Menus in Now Playing: Do not use
MenuinsideNowPlayingViewas it causes_UIReparentingViewerrors. UseButton + .sheet. - No watchOS Context Menus: Do not use
.contextMenuon watchOS (deprecated). Use.swipeActions. - No UIScreen:
UIScreen.mainis deprecated in iOS 26. UseGeometryReader. - Sheet Presentation: Do not use
sheet(isPresented:)combined withif letlogic due to timing bugs. Usesheet(item:). - Status Bar Isolation: Never use
.preferredColorSchemeto try and flip status bar icons—it will break the app's Dark Mode. Use theNavidromeHostingControllerdelegate.