Skip to content

Disabled battery bar when device is disconnected - #338

Merged
josancamon19 merged 1 commit into
BasedHardware:mainfrom
raymanyyy:fix/battery-pcnt
Jun 23, 2024
Merged

josancamon19 merged 1 commit into
BasedHardware:mainfrom
raymanyyy:fix/battery-pcnt

Conversation

@raymanyyy

Copy link
Copy Markdown
Contributor

@josancamon19
josancamon19 merged commit 3285829 into BasedHardware:main Jun 23, 2024
@raymanyyy
raymanyyy deleted the fix/battery-pcnt branch June 24, 2024 02:48
abunet added a commit to abunet/omi that referenced this pull request Aug 15, 2026
…uery_group parity

Two coupled collection-group defects (cubic PR 10887 BasedHardware#338 + BasedHardware#5/BasedHardware#6):

- BasedHardware#338 (regression from the BasedHardware#8 scoped-query fix): the facade applied `_name_filter_value` (which
  reduces a _DocRef to its bare id, correct for a scoped query the store rebuilds as
  f"{collection}/{value}") to the collection-GROUP where() too. But query_group matches _id directly,
  and _id IS the full logical path (a group spans parents, no collection to prefix) — so the bare id
  matched nothing on Mongo. Add `_group_name_filter_value` (keeps the _DocRef's full .path) and use it
  in _GroupQuery.where.
- Fake query_group parity: FakeDocumentStore.query_group ignored __name__ filters (tested d["__name__"],
  a key no doc has -> zero rows) and silently combined an explicit field order_by with a document-name
  start_after keyset that both real adapters reject with NotImplementedError. A test could pass
  hermetically then break on Mongo/Firestore. The fake now handles __name__ against the full path and
  raises NotImplementedError for order_by+keyset, matching the adapters and the store contract.

Verification:
- Live on Mongo: `collection_group('state').where('__name__','==', DocRef)` returns ['s1'] (was [] when
  the DocRef was reduced to the bare id).
- Rewrote test_group_query_supports_order_by_and_start_after (it asserted the fake-only behavior the
  real adapters reject) to the real contract: order_by streams ordered, order_by+keyset raises. Added a
  group __name__ DocRef-bound regression test (==, and >=).
- test_firestore_facade 25, test_canonical_short_term_maintenance_cron 9, test_fair_use_store 14,
  test_firestore_query_contract 26 pass; guards 0.
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