Repository navigation
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
| pub fn feature_count_for_save(&self) -> Option<u64> { | ||
| if self.is_open() { self.linked_feature_count() } else { self.checked_feature_count.or(self.saved_feature_count) } | ||
| } |
There was a problem hiding this comment.
When a source is open, this returns the live header count and ignores the saved baseline. The baseline is only compared at check_feature_count, and take_feature_count_change only clears it later, in notice_landed_pixels. Any save that runs before that point overwrites the baseline with the current count, so the change is never reported. Two paths reach that state:
repair(false, …)(normalize_after, used when a map is imported) opens linked sources and never callscheck_feature_count, because the check is gated onopened.- A source that opens with skipped rows returns
Nonehere, so the baseline and thelinked-source-feature-countrequirement are dropped with no notice.
A save of a project that was just opened, with no frame between, does the same. Keeping an uncompared or unsaid baseline until it is taken fixes all three. Please also add a regression test that saves before any view sync and one that imports a linked layer, since the current test only saves after a sync.
| pub fn feature_count_for_save(&self) -> Option<u64> { | |
| if self.is_open() { self.linked_feature_count() } else { self.checked_feature_count.or(self.saved_feature_count) } | |
| } | |
| pub fn feature_count_for_save(&self) -> Option<u64> { | |
| // A baseline not yet compared or reported stays the count written: the header read now may differ from it. | |
| if let Some(saved) = self.saved_feature_count { | |
| return Some(saved); | |
| } | |
| if self.is_open() { self.linked_feature_count() } else { self.checked_feature_count } | |
| } |
Category: bug
| if let Some((saved, current)) = layer.source.as_mut().and_then(|source| source.take_feature_count_change()) { | ||
| source_counts.push(notice_text::NoticeText::source_count_changed(&layer.name, saved, current)); |
There was a problem hiding this comment.
AGENTS.md asks for one notice per kind with a count. This pushes one notice per linked layer, so a project with several changed links gives several notices of the same kind. The existing source_errors path already aggregates this way, with a count. The same pattern would fit here: collect (name, saved, current) and emit one source_count_changed-style notice with a count, or name the layers in a list. The test that checks one notice per layer would then need updating.
Category: agents-md
|
|
||
| /// A streamed layer's source. | ||
| #[derive(Clone, Default, Serialize, Deserialize)] | ||
| #[serde(remote = "Self")] |
There was a problem hiding this comment.
#[serde(remote = "Self")] is needed here only so that getter works on a private field. With a remote derive, the derive emits inherent serialize/deserialize functions and not trait impls, which is why the manual impl Serialize/Deserialize below call Self::serialize. Inherent methods win path resolution, so this is correct, but it reads like infinite recursion. A one-line comment saying so, and why a getter is needed, would save the next reader time.
Category: quality
Code reviewReviewed the 9-file diff against Bugs
Security
Performance
Quality
AGENTS.md
Twins checked
Change sizeCompared with the base branch (merge base d364137 to PR head d74e0b5), 9 files changed: 1 added, 8 modified, 0 removed, 0 renamed.
|
Code reviewFindings are grouped by category. I read the full diff, the base AGENTS.md, and the three prior threads, and checked the code they point at. I did not build or run the tests; findings come from reading the code. Bugs
Security
Performance
Quality
AGENTS.md
Other points (lower confidence, not posted)
Change sizeCompared with the base branch: merge base 14c3c20 to PR head 110f565 (whole PR against
|
📖 Docs preview
GitHub Pages takes a minute or two to publish a new commit. Newer commits from the fork aren't published until a maintainer adds the |
|
Closing this. Once written, the saved count needs a capability that older releases refuse, so ordinary projects with a layer read in place would stop opening in them, for the sake of one notice. Reading the count first and writing it a release later would soften that, but not enough to be worth it. #3208 already says when a linked source's fields change. |
Summary
Linked layers now report how many features their source gained or lost since the project was saved. The check uses the reopened source header. Sources that finish opening later compare it alongside the saved fields on their first view.
Not for merging yet: the compatibility cost below is undecided. This adds an optional field to format 2 together with a
linked-source-feature-countrequirement. A project, map or layer file that has a layer read in place from a file with a known count lists it, so 0.8.0 and earlier refuse to open that file; they open such a project when it is saved without this change. Saves use a whole-source count the reader already knows. A definition query or view window can show fewer rows while the saved count still covers the source. Subset and estimated counts leave the field absent. Thelinked-source-feature-countrequirement protects files with a baseline from older readers that would discard it on save.The shared project and map paths cover desktop, browser, and mobile. Local links report changes during project open, including from the CLI and Python. Assistant, MCP, and plugins retain their existing command interfaces. The notice records a net change on reopen and creates no Undo step. The comparison adds two optional counts per link and holds 0× the layer's feature storage.
Testing
The full Linux fork gate passed, including the wasm build and browser smoke test.
UI evidence
Related issue
Part of #1998
Related to #1853
Summary by CodeRabbit