v1

## User Profile
The durable memory is dominated by `/home/Messier82/projects/car-parts-comparator-poc`, with one repo-specific default preserved for `/home/Messier82/projects/service-book`. In `car-parts-comparator-poc`, the user repeatedly wants behavior-preserving product work grounded in the real affected surface: spec-first for substantial features, architecture-first for large refactors, and broader audits when a bug class could span multiple stores or host variants. They care about concrete UX behavior and source-faithful wording: focus-driven history instead of extra controls, `Pirkumu plāns` and `Meklēšanas vēsture` as chosen names, subtle contextual diagnostics, crisp native-looking Android solve UI, and glass/translucent shell styling that is actually visible at runtime. They correct scope quickly when an agent assumes the wrong platform or stops at the first failing target. Their normal finish line is implementation plus verification plus rebuilt artifacts when needed, followed by a commit when they ask for one. In `service-book`, the current durable note is that Gradle Managed Device guidance should default to hardware rendering, not `swiftshader_indirect`. [ad-hoc note]

## User preferences
- For significant feature work, follow the user’s spec-first workflow: "start from the functional docs and only after finalizing those, proceeding."
- For large frontend refactors, follow the user’s architecture-first workflow: "analyze the whole frontend and determine the places that need refactor and do it", not a cosmetic split.
- Preserve user-chosen/product-native wording when they settle it, such as `Pirkumu plāns` and `Meklēšanas vēsture`, instead of renaming features into generic terminology.
- When platform evidence is ambiguous, ask which platform is affected before making platform-specific edits.
- When a bug might span multiple stores or shared shells/hosts, do not stop at the first failing target; audit the full relevant surface and close with regression coverage plus live/runtime verification.
- For search/history UI, default to the conventional input-focus pattern, not a separate history button; preserve Tab-as-prefill and Enter/click-as-search semantics.
- For stale or refreshable data, prefer an explicit warning/banner plus manual refresh over automatic refresh-on-open.
- For visual polish, do not treat a rebuild as proof; verify that the runtime effect is actually visible.
- For diagnostics/reporting UI, default to subtle, contextual affordances instead of obvious global links when the user says the feature is "too apparent" or should be "more hidden".
- When the user asks to "commit" after verification, finish the workflow with the commit instead of leaving the worktree uncommitted.
- In `/home/Messier82/projects/service-book`, default Gradle Managed Device docs/commands/CI notes to hardware rendering; mention `swiftshader_indirect` only as an explicit fallback. [ad-hoc note]

## General Tips
- Search `MEMORY.md` by exact handles first: `FRONTEND-ARCHITECTURE.md`, `SearchInputComponent`, `Pirkumu plāns`, `SEARCH-HISTORY-FUNCTIONAL-SPEC.md`, `still non transparent`, `waitForSelector`, `backgroundThrottling`, `github.run_number`, `swiftshader_indirect`.
- For comparator frontend refactors, check whether the real bottleneck is still `web/src/app/app.html` / `web/src/app/app.ts` before touching already cohesive services.
- For comparator UI follow-ups, grep exact strings like `Diagnostika`, `search-diagnostics.ts`, `app-content-scroll`, `desktop/main.ts`, and `tests/engine.test.ts` before broad searching.
- In `car-parts-comparator-poc`, ask for exact repro inputs early on store/session bugs; the user will provide concrete part numbers when prompted directly.
- For this repo’s UI bugs, `desktop/main.ts` smoke checks are a high-leverage verifier for geometry, overlay placement, and computed style, not just build success.
- For cross-platform persistence features in this repo, check delete/retry behavior, not only save paths; stale backend state can resurrect locally removed items.
- Packaging should follow the final approved UX; otherwise expect to rebuild the Windows portable `.exe` and Android `.apk`.
- Treat Android APK packaging and live-device validation as separate checks; ADB access may be unavailable even when packaging succeeds.

## What's in Memory

### /home/Messier82/projects/car-parts-comparator-poc

#### 2026-07-21

- Frontend architecture refactor into feature components: FRONTEND-ARCHITECTURE.md, app.html, app.ts, SearchInputComponent, tests/engine.test.ts, 48207af
  - desc: Search this first for behavior-preserving Angular frontend refactors, root-component decomposition, feature ownership boundaries, and the verification/commit path for `cwd=/home/Messier82/projects/car-parts-comparator-poc`.
  - learnings: the highest-leverage split was presentation ownership, not core services; after extraction, template-structure tests had to move to the new feature templates and desktop smoke still mattered.

#### 2026-07-18

- Diagnostics UI hidden refinement and commit: diagnostics, Diagnostika, Details, icon-only trigger, search-diagnostics.ts, cdcf21e
  - desc: Search this first for comparator diagnostics/reporting UI follow-ups where the user wants the feature less visible but still retrievable, plus the verification/build path before commit.
  - learnings: the accepted pattern is no global diagnostics link, only a muted info icon on affected store chips, with diagnostic evidence retained after later successful retries.

#### 2026-07-17

- Shell scrollbar fix and visible glass header: scrollbar, app-shell, app-content-scroll, glass header, backdrop-filter, desktop/main.ts
  - desc: Search this first for shell/header layout bugs, translucent-header work, and cases where a rebuild "worked" but the visual effect still was not actually visible in `car-parts-comparator-poc`.
  - learnings: the durable fix moved scrolling into `.app-content-scroll`, and glass styling only looked right once content and scrollbar geometry truly sat beneath the header.
- Search-history spec, implementation, and measurement removal: SEARCH-HISTORY-FUNCTIONAL-SPEC.md, /api/search-history, Capacitor Preferences, measurement.ts, 522250c
  - desc: Use this for spec-first feature work around recent-search history, cross-platform persistence, removal of old analytics/UTM plumbing, and rebuilt desktop/Android deliverables.
  - learnings: approved UX is focus-open history with Tab prefill, and persistence needs a pending-change marker so stale backend state does not restore deleted history.

### Older Memory Topics

#### /home/Messier82/projects/car-parts-comparator-poc

- Windows desktop challenge-flow fix: Windows, challenge_required, waitForSelector, backgroundThrottling, Trodo, 34118831822, 51137497285
  - desc: Use this for `cwd=/home/Messier82/projects/car-parts-comparator-poc` when diagnosing Electron challenge loops, hidden `BrowserWindow` timing, Trodo JSON-envelope edge cases, and packaged Windows verification.
- Phase G Android showcase and release hardening: WebViewFetcherPlugin, ic_close.xml, solve_view_enter.xml, github.run_number, aapt dump badging
  - desc: Use this for Android solve-view polish, showcase-only plumbing removal, review-driven fixes, versionCode hardening, and single-layer clickout decoration in `cwd=/home/Messier82/projects/car-parts-comparator-poc`.
- Purchase-plan feature and cross-store refresh audit: Pirkumu plāns, car-parts-comparator.purchase-plan, directRefresh, Handler.lv, IC24
  - desc: Search this for browser-persistent purchase planning, chosen-offer-versus-alternative modeling, stale-offer UX, and cross-store exact-refresh normalization in `cwd=/home/Messier82/projects/car-parts-comparator-poc`.

#### /home/Messier82/projects/service-book

- Gradle Managed Device rendering default: Gradle Managed Device, GMD, hardware rendering, swiftshader_indirect, /home/Messier82/projects/service-book
  - desc: Use this for `cwd=/home/Messier82/projects/service-book` when editing managed-device commands, CI wiring, docs, or verification notes; the durable default is hardware rendering, not `swiftshader_indirect`. [ad-hoc note]
