You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Task]: Make Flask a thin web adapter around navigation #79
routes.py currently handles graph loading, error interpretation, identity parsing, floor bounds, and response shape. Flask should translate web inputs into a navigation request and navigation results into a page model, rather than carry domain/data knowledge.
Proposed change
Construct navigation in create_app() and retain it in app.extensions or the established application context. Routes should get building/location options through the navigation interface, turn submitted fields into validated route requests, map domain results/errors to explicit page-model fields, preserve selections on error, and pass explicit floor segments to templates. Remove hard-coded development endpoints such as /api/test unless they are justified.
Affected modules or data
app/__init__.py, app/routes.py, templates/page models, and route tests
The navigation interface created by the deep-navigation module
No CSS redesign, database migration, or new public API version
Acceptance criteria
create_app() owns navigation construction.
Routes depend only on the navigation interface, not JSON/NetworkX or node-ID parsing.
Domain failures produce intentional user-facing responses.
Multi-floor results reach the page as explicit segments.
Hard-coded test endpoints are removed or justified and just check passes.
Testing requirements
Use controlled navigation implementations in Flask/route tests instead of filesystem/global-graph setup. Exercise rendered page models and error preservation.
Dependencies and risks
This depends on the deep-navigation module. Keep it separate from navigation-domain design so both seams can be reviewed independently.
Activity