Repository navigation
Fix map layout to fill window and reduce private.coffee timeout - #892
Conversation
louis-e
commented
Apr 6, 2026
- Make map stretch to fill available viewport height when window is maximized, with proper buffer for footer version text
- Remove body default margin and prevent scrollbar overflow
- Reduce Overpass private.coffee fallback server timeout from 360s to 120s
- Make map stretch to fill available viewport height when window is maximized, with proper buffer for footer version text - Remove body default margin and prevent scrollbar overflow - Reduce Overpass private.coffee fallback server timeout from 360s to 120s Co-Authored-By: Claude Opus 4.6 <[email protected]>
There was a problem hiding this comment.
Pull request overview
This PR updates the GUI layout so the embedded map area expands to fill the available window height (while reserving space for the footer), and adjusts the Overpass fallback timeout behavior for overpass.private.coffee.
Changes:
- Add global
html, bodysizing rules and convert the main GUI layout to a full-viewport flex column so the map panel can grow (flex: 1). - Tweak spacing and flex behavior for the header row and footer to reduce overflow/scrollbars.
- Reduce the HTTP request timeout used for the
overpass.private.coffeefallback from 360s to 120s.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/retrieve_data.rs |
Adds a per-server HTTP timeout passed into the reqwest download helper; shortens timeout for private.coffee. |
src/gui/css/styles.css |
Adjusts global page sizing/overflow and flex layout so the map pane fills remaining vertical space. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| html, body { | ||
| margin: 0; | ||
| padding: 0; | ||
| height: 100%; | ||
| overflow: hidden; | ||
| } |
There was a problem hiding this comment.
html, body { overflow: hidden; } will prevent any scrolling. Because .flex-container has a min-height: 420px plus the logo row and footer, the UI can be clipped on smaller window heights (or with larger fonts/localized strings) with no way for users to reach controls/footer. Consider using overflow: auto on body/.container, or switching .container to min-height: 100vh and only hiding overflow on the map pane if needed.
| let timeout_secs = if url.contains("private.coffee") { | ||
| 120 | ||
| } else { | ||
| 360 | ||
| }; | ||
| println!("Downloading from {url} with method {download_method}..."); | ||
| let result = match download_method { | ||
| "requests" => download_with_reqwest(url, &query), | ||
| "requests" => download_with_reqwest(url, &query, timeout_secs), |
There was a problem hiding this comment.
The Overpass query string still hard-codes [timeout:360] (server-side timeout), while the HTTP client timeout is reduced to 120s for private.coffee. If the intent is to actually reduce the Overpass execution time for that server (and avoid leaving the server computing after the client aborts), consider generating a per-server query with a lower [timeout:...] when using private.coffee, or clarify via naming/comment that only the HTTP timeout is being adjusted.