hasadna/open-bus-map-search

Transport map: typing a time triggers a fetch on every keystroke

オープン

#1,610 opened on 2026/06/04

 (3 件のコメント) (0 件のリアクション) (0 人の担当者)TypeScript (125 件のフォーク)auto 404
frontendgood first issue

Repository metrics

Stars
 (95 個のスター)
PR merge metrics
 (平均マージ 6d 5h) (30d で 42 merged PRs)

説明

On the transport map page (/map, src/pages/timeBasedMap/index.tsx), every keystroke in the time picker triggers a new data fetch, so typing a time sends a request for each partial value instead of just the final one. Typing 23:55 triggers 4 fetches (02:00, 23:00, 23:05, 23:55), only the last of which matters.

Why it's a problem: it sends many unneeded requests that load the system for no reason, and it hurts the user experience. The user sees the map reload several times and the page feels slower.

Proposed fix: debounce the value that drives the fetch while keeping the picker immediate, using the same pattern already applied to the line search in #38. Uses the existing debounce from es-toolkit/compat, and is contained to timeBasedMap/index.tsx.

コントリビューターガイド