Skip to content

Services: follow-ups to #924 (a plainer note, /items in any case, the timeout hint only without bbox) - #944

Merged
giswqs merged 3 commits into
opengeos:mainfrom
elpidioassinaturas:fix/819-followups
Oct 26, 2026
Merged

giswqs merged 3 commits into
opengeos:mainfrom
elpidioassinaturas:fix/819-followups

Conversation

@elpidioassinaturas

@elpidioassinaturas elpidioassinaturas commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Three small follow-ups to #924 (#819), from its reviews, which were committed after it was merged:

  • A plainer note. When a feature layer's request can't carry an area, service.add and the From Service dialog used to say "the service can't be asked for an area". That was misleading for an address that already filters (bbox, CQL_FILTER, …) or a plain file. Both now say "its request can't carry an area, so the whole layer is asked for".
  • /items in any case. features_in_area finds an OGC API items path after lowercasing it, as is_arcgis_query does.
  • The timeout hint only without bbox. When a whole layer runs past service.add's 60 s, the error suggests "bbox". It now depends on whether a bbox was given, not on whether the request could carry it. So a WFS 1.0 service, or an area across the antimeridian, isn't told to add the bbox it already has.

Testing

  • features_asked_for_over_an_area: an items path in another case and with a trailing slash.
  • New a_slow_whole_layer_suggests_bbox_only_when_none_was_given: the hint with and without a bbox; other errors left alone.
  • service_features_asked_for_over_an_area: the note's new wording.
  • cargo xtask ci on Windows (cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings, cargo test --workspace, 2,341 tests, with RUSTGIS_LANGUAGE=en), on main at 2f08089.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • OGC feature services with /items paths are now recognized regardless of letter casing, including paths with trailing slashes.
    • Area-based feature downloads provide clearer notices when a request cannot include the area or crosses the antimeridian.
    • Timeout guidance to supply a bbox or "view" is shown only when no area was supplied.

elpidiofilho and others added 2 commits October 26, 2026 09:29
…in any case (opengeos#819)

The note no longer says the service can't be asked for an area when the
address already filters or is a plain file. An OGC API items path is found
whatever its case, as an ArcGIS query is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pengeos#819)

When an area was asked for but its request couldn't carry it (WFS 1.0, the
antimeridian), the timeout error no longer suggests the bbox already given.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: b86dbdf5-4b4f-4576-91fc-b5349290e796
Commits

Reviewing files that changed from the base of the PR and between 7accbbf and 3fe54bf.

Files selected for processing: 2
  • crates/data/src/ogc.rs
  • crates/engine/src/cmd/service.rs

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

Walkthrough

The change updates OGC API /items path matching to accept mixed case and trailing slashes. Feature-download fallback handling now tracks whether a bounding box was supplied when selecting notices and timeout guidance. The related test expectation and UI notice text are updated.

Changes: Feature-service area requests

Layer / File(s) Summary
OGC API path matching
crates/data/src/ogc.rs
A private helper recognizes terminal /items paths without regard to case and after trimming trailing slashes. Tests cover mixed-case paths and near matches.
Fallback notices and timeout guidance
crates/engine/src/cmd/service.rs, crates/engine/src/tests.rs, crates/ui-egui/src/serviceui.rs
Fallback handling tracks whether a bounding box was supplied independently of whether an area-specific request URL was produced. The notice distinguishes antimeridian areas from requests that cannot carry an area. Timeout guidance depends on whether an area was supplied. The test expectation and UI notice use the request-focused wording.

Priority: Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

Possibly related PRs

  • opengeos/RustGIS#924: This PR changes area-aware service request behavior introduced there, including /items matching and fallback handling.
  • opengeos/RustGIS#823: This PR changes timeout guidance in the feature-download path affected by that PR’s pagination behavior.

Suggested reviewers: giswqs

Merge Risk: Minimal · up to 3fe54

The updated path matching, fallback notice, and timeout guidance are ready to merge with no identified merge-blocking risk.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 77.78% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly summarizes the three follow-up changes: plainer wording, case-insensitive /items handling, and conditional timeout guidance. It is somewhat long but remains specific and relevant.
Description check Passed The description includes complete Summary and Testing sections with clear change details and validation information. It does not include the required Related issue section, but the related issues are …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description includes complete Summary and Testing sections with clear change details and validation information. It does not include the required Related issue section, but the related issues are identified in the Summary, so the description is mostly complete.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the path at night,
“/Items/” now matches right.
If bounds were sent, the notes reflect,
If none were sent, the hints direct.
The map can rest beneath the moon,
While fallback messages land in tune.

Comment @coderabbitai help to get the list of available commands.

Comment thread crates/data/src/ogc.rs Resolved
@github-actions

Copy link
Copy Markdown
Contributor

Code review

This is a small PR. It makes the /items match case-insensitive, rewords the "can't carry an area" notice, and stops suggesting bbox when one was already given. I found no bugs and no security problems.

Bugs

  • None found. slow_whole_layer now keys on whether a bbox was given, not on whether the request carried it. That is correct for the antimeridian case, where the "whole layer" notice has already told the user why the area was dropped. A view given without a bbox still gets the suggestion, which is consistent with the existing logic.

Security

  • None. The lowercase comparison is applied to the URL path only, and no new input is parsed.

Performance

  • Nit (low): to_ascii_lowercase() allocates a string on every call. eq_ignore_ascii_case on the trailing 6 bytes would avoid that, though the cost is negligible here.

Quality

  • Test coverage (medium): no test covers the case-insensitive /items match, and none covers the new rule of not suggesting bbox once one was given. The existing test only checks the reworded notice. See the inline comment.

AGENTS.md

  • The reworded UI string in serviceui.rs still goes through i18n::fmt. The .tsv catalogs don't need updating in a PR, so nothing is missing there.
  • The engine code uses no unwrap, expect or panic.
  • The cfg(wasm32) split is unchanged.

Change size

Compared: the whole PR against main (merge base 2f08089 to PR head 7accbbf)

Metric Value
Files changed 4 (0 added, 4 modified, 0 removed, 0 renamed)
Size before 1.21 MB
Size after 1.21 MB
Total size change +216 B
File Before After Change
crates/engine/src/cmd/service.rs 29.8 KB 30.0 KB +209 B
crates/data/src/ogc.rs 180.0 KB 180.1 KB +21 B
crates/engine/src/tests.rs 1016.6 KB 1016.6 KB -7 B
crates/ui-egui/src/serviceui.rs 14.5 KB 14.5 KB -7 B

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

📖 Docs preview

Item Value
Preview https://preview.rustgis.app/pr-944/
Web app https://preview.rustgis.app/pr-944/app/
Commit 3fe54bf

GitHub Pages takes a minute or two to publish a new commit.

…geos#819)

features_asked_for_over_an_area covers an items path in another case and
with a trailing slash (now matched without allocating), and a new
a_slow_whole_layer_suggests_bbox_only_when_none_was_given covers the hint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Code review

I found no bugs or security issues in this PR. It changes four files and I read the whole diff.

What I checked

  • ends_with_items (crates/data/src/ogc.rs): the slice p.get(p.len() - 6..) can't panic, because len >= 6 is checked first and get returns None on a non-char boundary. Trailing slashes, /items-old, tems and /x/ITEMS all behave as the new test expects. This follows the never-crash rule: no unwrap, no indexing.
  • slow_whole_layer (crates/engine/src/cmd/service.rs): given now means the caller passed a bbox, even when the request couldn't carry it. The bbox hint is therefore dropped in exactly the case where it would repeat what the user already supplied. The new unit test covers a slow error with and without bbox, and a non-timeout error. The cfg(all(test, not(wasm32))) gate matches the function's own cfg.
  • Notice wording: the old and new strings are changed consistently in the engine, in the UI (serviceui.rs) and in the engine test assertion.
  • Wasm and layering: nothing here affects either.

Bugs

  • None found.

Security

  • None found.

Performance

  • None found.

Quality

  • Low confidence (nit): the notice text appears to have no entries in the crates/ui-egui/src/i18n/*.tsv catalogs. Grep found no copies of the old string outside the PR context files. If a translation did exist for it, the reworded string would fall back to English until the maintainer re-translates. AGENTS.md says this is acceptable.
  • Low confidence (nit): the ends_with_items doc comment says "in any case". Elsewhere in features_in_area, the is_arcgis_query and SPATIAL_KEYS checks may still be case-sensitive. That is out of scope here, but you could check it for consistency.

AGENTS.md

  • Compliant. There is no unwrap or panic, user-visible text goes through i18n::fmt, and the change adds regression tests.

Change size

Compared: the whole PR against main (merge base 2f08089 to PR head 3fe54bf)

Metric Value
Files changed 4 (added 0, modified 4, removed 0, renamed 0)
Size before 1,270,739 B (1.21 MB)
Size after 1,272,292 B (1.21 MB)
Total size change +1.5 KB (+1,553 B)
File Before After Change
crates/engine/src/cmd/service.rs 29.8 KB 30.7 KB +935 B
crates/data/src/ogc.rs 180.0 KB 180.6 KB +632 B
crates/engine/src/tests.rs 1016.7 KB 1016.6 KB -7 B
crates/ui-egui/src/serviceui.rs 14.5 KB 14.5 KB -7 B

@giswqs
giswqs merged commit a5f50ce into opengeos:main Oct 26, 2026
20 checks passed
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.

3 participants