knowledge: 1 insight — a Compose map marker whose position comes from changing state: rememberUpdatedMarkerState inside key(item.id), rememberMarkerState reads position once (deprecated v6.4.3) (1 new page + new mobile/state category, 1 back-link, 18 plan-gaps retired as local-layer) - #229
Open
choiyounggi wants to merge 1 commit into
Open
choiyounggi wants to merge 1 commit into
choiyounggi wants to merge 1 commit into
Conversation
…changing position)
This was referenced Sep 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Knowledge flush — 1 insight (19 claimed rows: 1 ingested, 18 plan-gap rows retired as local-layer)
Run id
20260928-144949-57122(inherited from the auto-flush parent viaDEV_LOOP_FLUSH_RUN_ID;flush-lock.sh acquireansweredalready-owned). Claimed ids:097a257377078016(session row, ingested) plus 18plan-gaps.jsonlrows listed under Local-layer candidates.Verified best-practice
Claim (row
097a257377078016, repo t6a-trip-ui / dace): when a maps-composeMarker's position comes from changing state, build it withrememberUpdatedMarkerState(position)insidekey(item.id) { … }; keep therememberSaveable-based constructor only for a marker whose start point never moves. Mechanism:rememberMarkerStateisrememberSaveable { MarkerState(position) }, so the argument is only the initial value; remembered state is positional, so a changed list hands one item another item's state.Sources checked and how:
maps-compose/src/main/java/com/google/maps/android/compose/Marker.ktonmain(raw fetch, 2026-09-28):rememberMarkerState=rememberSaveable(key = key, saver = MarkerState.Saver) { MarkerState(position) }, annotated@Deprecated("Use 'rememberUpdatedMarkerState' instead - It may be confusing to think that the state is automatically updated as the position changes, so it will be changed or removed.");rememberUpdatedMarkerState=remember { MarkerState(position = position) }.also { it.position = position };MarkerState.positionismutableStateOf. AlsodragStateis itself deprecated in favour ofisDragging(line 108–113), so the page citesisDragging.v6.6.0(the version the session pinned), lines 195–225 re-read viacurl … | sed -n '195,225p': identical definitions and the same@Deprecated, confirming the row'sMarker.kt:203-221citation.remember-updated-marker-state.html— "updates the state value according to the update of the input parameter, like 'rememberUpdatedState'. This cannot be used to preserve state across configuration changes";remember-marker-state.html— "this function does not automatically update the MarkerState when the input parameters change" plus the deprecation notice.0d6f023) introduced the deprecation andrememberUpdatedMarkerState.gh api repos/googlemaps/android-maps-compose/compare/<tag>...0d6f023givesaheadfor v6.4.1/v6.4.2 andbehindfor v6.4.3/v6.4.4/v6.5.0, so v6.4.3 is the first release containing it. PR #730 (merged 2025-08-06, "bring rememberMarkerState back … The function is still deprecated") isbehindv6.7.1 andaheadof v6.7.0, so the function was absent in 6.7.0 and restored in 6.7.1.https://developer.android.com/develop/ui/compose/lifecycle(fetched): "When calling a composable multiple times from the same call site, Compose doesn't have any information to uniquely identify each call … the execution order is used in addition to the call site"; thekeycomposable andLazyColumnitems(key = …)are the documented remedy.maps-compose:8.6.0) usesrememberUpdatedMarkerStatein its own MarkerState example.Result: confidence: verified (official source + API docs + Android docs + reproducible compare-API check). One edge case (a draggable marker under a re-assigned position is reset on each composition) is derived from the
.also { it.position = position }source line, not from an external doc, and the page says so by quoting the mechanism.Existing-layer check
Pages read: mobile-lifecycle-process-death-and-state, mobile-presentation-gating-nested-sheet-presentation
INDEX.md→ mobile domain (app-side Android).wiki/mobile/index.mdread in full: categories lifecycle / offline / networking / release / performance / navigation / presentation / permissions / security; no "load when" line overlaps a Compose map marker or in-composition state identity.grep -rli 'maps-compose|rememberMarkerState|google maps' wiki/→ 0 hits;grep -rli 'rememberSaveable|positional memoization|stable key|key('→ onlymobile/lifecycle/process-death-and-state.md(mentionsrememberSaveableas a saved-state mechanism) plus two unrelated pages (suppression-key, spec-artifact-checks).wiki_search(k=5) on the trigger sentence returned qa-environments-element-crop-screenshots, platforms-processes-driving-a-tui-in-a-tmux-pane, infrastructure-agent-orchestration-pane-delivery-confirmation, frontend-design-responsive-layout, qa-document-verification-retiring-a-provisional-marker — all lexical "marker/position" matches, none the same situation. No merge target → new page.rememberSaveablefor transient UI state"; the new page's configuration-change edge case defers to it (hoist toViewModel/SavedStateHandle, then pass in). Related link added both ways (process-death-and-staterelated:gained the new id; no open PR toucheswiki/mobile/, so the back-link is safe).Open-PR check
gh pr list --repo choiyounggi/dev-loop --state open --search "head:knowledge/"→ #223 (knowledge/choiyounggi-20260927-220735), #225 (…-20260928-082803), #226 (…-092831), #227 (…-103056), #228 (…-134840). Each head fetched;git diff --name-only origin/main origin/<head> -- wiki/ INDEX.mdand a grep of each diff formaps-compose|MarkerState|jetpack compose|remember(|rememberSaveable|key(→ 0 hits in all five. None toucheswiki/mobile/**; #223/#225/#227 editINDEX.mdbut not the[mobile]row (checked per PR withgrep '^[-+].*\[mobile\]'→ no lines).Verdict per candidate:
097a257377078016→ new. The 18 plan-gap rows are local-layer drops (below), so no open-PR overlap applies to them.Routing decision
097a257377078016→wiki/mobile/state/map-marker-state-from-changing-position.md(idmobile-state-map-marker-state-from-changing-position,applies_to: [android, jetpack-compose], 67 body lines).mobile/state— "in-composition UI state identity". Why the existing ones don't fit:lifecycleis state survival across process death/config change (where each kind of state lives); this page is about which remembered instance a running composition binds to and whether a parameter is read once or on every composition.presentationis modal hosting.frontend/stateis web UI. The new category's index row and the mobile "Route here for" paragraph name it, and the rootINDEX.mdmobile route line was widened with "a Compose map marker whose position comes from changing state".wiki/mobile/index.md(+## statesection),INDEX.md(mobile row),log.md(ingest entry),wiki/mobile/lifecycle/process-death-and-state.md(reciprocalrelated:).Local-layer candidates
All 18
plan-gaps.jsonlrows are wiki-plan "no owning wiki page" design records whose directives name one repository's own files, RFC numbers, test lines or signatures; each would be wrong in another codebase. Retired as handled; runwiki-ingestinside the owning project if any is wanted there.seagrass (linkly), task t172-money-set-and-guards — target
wiki-local/backend/python/<slug>.mdin that repo:f8274e8a574a39af_check_dimensionsmessage names RFC-0051 only when"money"participates →money-mismatch-message-cites-rfc-0051ff968018e51af793interp.eval_valueRefbranch gains a Money dict case (shape dispatch) →money-runtime-shape-dispatchf541156192eeee35money.pysub/mul_intpure, import-free, own ±INT64 check →money-sub-mul-int-domain-check4bac29ffc7930e3c_condition_holdsspec-only Money order comparison opened →money-order-comparison-in-spec72355943be4f08f4RFC-0051 status Draft + Updates chain per RFC-0007 §2.2 →wiki-local/qa/document-verification/rfc-0051-updates-chain4d2a12cfb4602426and1958e49958fa5319(identical text, two harvests) t177 declared-field rule reaches_dimension_ofthrough the generic reference loop →numeric-predicate-declared-field-rulecae239f03ddab2cdRFC_ROUTES["0051"], generated grammar prose, README/CHANGELOG/ENFORCEMENT rows →rfc-0051-registry-rowsdace (linkly-calendar), task t6a-trip-ui — target
wiki-local/mobile/<category>/<slug>.mdinapps/android:7068f2146ea1e6b9GoogleMapsKeyResolver.isValidKey/readManifestKeyempty-key gate →maps/google-maps-key-gate3042cba1f8844f84TripTabRootreceives a constructedTripViewModel→navigation/trip-tab-root-viewmodel-injectiond771e774c84744e2OPTIMIZE_APPLY_FAILED_MESSAGEconstant and local message state →presentation/optimize-apply-failed-messagec3868b8e8b2fab3bmoveItem/deleteItempure list functions inTripItineraryEdit.kt→state/itinerary-move-delete-pure-functions772f3a2a727f3cfetripDatesInRange/tripShortDisplayonjava.time.LocalDate→state/trip-date-chip-pure-functions07729881a03fce5fcategory markers viaMarkerComposablebadge (6.6.0) →maps/category-marker-composable25c323dfe8e9f66chand-rolleddecodePolylineinTripMap.kt→maps/encoded-polyline-decoder8979225a66711966pinned maps-compose 6.6.0 / play-services-maps 20.0.0 verified from Gradle module metadata →maps/pinned-maps-versionseef21f20e6149557MapStyleobject loadingres/raw/map_style_light.jsonand parse-failure behaviour →maps/map-style-json-loading081eb80b1695e007.orchestration-notes/t6a-trip-ui.mdpublic-signature record →wiki-local/infrastructure/agent-orchestration/t6a-orchestration-notes