Skip to content

Add IncludeSpecials toggle for station maps and Telegram bot#229

Draft
Copilot wants to merge 1 commit into
masterfrom
copilot/update-station-maps-feature
Draft

Add IncludeSpecials toggle for station maps and Telegram bot#229
Copilot wants to merge 1 commit into
masterfrom
copilot/update-station-maps-feature

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 15, 2026

Summary

Adds a toggle to show/hide special and historic stations on station maps, and a per-user setting in the Telegram bot to include special stations when searching for nearby stations.

Changes

Backend

  • StationGrouping model: Added IncludeSpecials boolean property (defaults to false — existing behaviour preserved)
  • User model: Added TelegramIncludeSpecials boolean property for the bot setting
  • EF migration (20260515122447_AddIncludeSpecials): Adds both new columns with DEFAULT FALSE
  • StationMapDTO: Exposes IncludeSpecials to the API
  • MappingExtensions: Maps IncludeSpecials in SelectToStationMapDTO
  • StationMapsController:
    • GetVisitedStations conditionally excludes special stations based on the per-map setting
    • PutMap / PostMap persist the IncludeSpecials field

Telegram bot (TelegramBotService)

  • Location handler: Passes TelegramIncludeSpecials to the nearby-stations query
  • Callback handler: Uses the user setting when calculating region visit percentages; disambiguates toggle_specials callbacks from station-ID callbacks
  • Settings command: Handles /settings and the reply-keyboard "⚙️ Settings" button — shows current state with an inline toggle
  • toggle_specials callback: Flips TelegramIncludeSpecials in the DB and updates the settings message in-place
  • Reply keyboard: Updated to include "📍 Share your location" and "⚙️ Settings" rows for consistent access

Frontend (Angular)

  • StationMap interface: added includeSpecials: boolean
  • station-maps-edit dialog: new checkbox bound to includeSpecials via reactive form
  • i18n: STATIONMAP.INCLUDESPECIALS key added in both en.json and nl.json

Behaviour

Context Default User control
Station map view Specials hidden Toggle per map in edit dialog
Telegram bot nearby search Specials hidden /settings → toggle inline button

All existing tests pass (15/15). Both backend and frontend build without errors.

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.

2 participants