Skip to content

Fix map layout to fill window and reduce private.coffee timeout - #892

Merged
louis-e merged 1 commit into
mainfrom
fix/ui-layout-and-timeout
Apr 6, 2026
Merged

louis-e merged 1 commit into
mainfrom
fix/ui-layout-and-timeout

Conversation

@louis-e

@louis-e louis-e commented Apr 6, 2026

Copy link
Copy Markdown
Owner
  • 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]>
Copilot AI review requested due to automatic review settings April 6, 2026 15:52
@louis-e
louis-e merged commit 064fe64 into main Apr 6, 2026
1 of 3 checks passed
@louis-e
louis-e deleted the fix/ui-layout-and-timeout branch April 6, 2026 15:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, body sizing 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.coffee fallback 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.

Comment thread src/gui/css/styles.css
Comment on lines +20 to +25
html, body {
margin: 0;
padding: 0;
height: 100%;
overflow: hidden;
}

Copilot AI Apr 6, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment thread src/retrieve_data.rs
Comment on lines +197 to +204
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),

Copilot AI Apr 6, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
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