feat: add session checkpoint for category chip enhancements and cache invalidation
Test Suite / test (24.15.0) (push) Has been cancelled
Test Suite / test (24.15.0) (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,60 @@
|
|||||||
|
# Session Checkpoint (2026-05-11)
|
||||||
|
|
||||||
|
## Status
|
||||||
|
- Branch/worktree: ändringar finns lokalt och är analyserade med `flutter analyze`.
|
||||||
|
- Senaste verifiering: `flutter analyze lib/core/utils/display_labels.dart lib/features/inventory/presentation/swipeable_inventory_tile.dart lib/features/pantry/presentation/pantry_screen.dart` -> inga fel.
|
||||||
|
|
||||||
|
## Klart i denna session
|
||||||
|
|
||||||
|
1. Kategori-chip i `/inventory` och `/baslager` visar nu djupaste kategori (L3 om den finns, annars L2/L1) utan prefix (`L1/L2/L3`).
|
||||||
|
2. Hover/long-press på chip visar full kategoriväg (`L1 > L2 > L3`) via tooltip.
|
||||||
|
3. Cache-invalidation fixad efter kategoriändring i admin:
|
||||||
|
- Invaliderar både `inventoryProvider` och `pantryProvider` i globala produktflöden.
|
||||||
|
4. Kodstädning/optimering:
|
||||||
|
- Gemensam helper returnerar både chip-label och tooltip i en parsing.
|
||||||
|
- Oanvänd helper borttagen.
|
||||||
|
5. Dokumentation uppdaterad och rubrik-konflikt städad för 2026-05-11-sektionerna.
|
||||||
|
|
||||||
|
## Ändrade filer
|
||||||
|
|
||||||
|
- `flutter/lib/features/admin/presentation/admin_products_panel.dart`
|
||||||
|
- `flutter/lib/core/utils/display_labels.dart`
|
||||||
|
- `flutter/lib/features/inventory/presentation/swipeable_inventory_tile.dart`
|
||||||
|
- `flutter/lib/features/pantry/presentation/pantry_screen.dart`
|
||||||
|
- `TEKNISK_BESKRIVNING.md`
|
||||||
|
|
||||||
|
## Viktiga beteenderegler som nu gäller
|
||||||
|
|
||||||
|
- Chiptext: visar endast djupaste kategorinamn.
|
||||||
|
- Tooltip: visar full kategori-path.
|
||||||
|
- Om path saknas: fallback till L1/"Övrigt" enligt befintlig modell.
|
||||||
|
|
||||||
|
## Kvar / nästa steg (rekommenderat)
|
||||||
|
|
||||||
|
1. Lägg widgettester för category-chip:
|
||||||
|
- inventory: djupaste label + full tooltip
|
||||||
|
- baslager: djupaste label + full tooltip
|
||||||
|
2. Besluta om sortering ska följa visad kategori (djupaste nod) eller fortsatt L1.
|
||||||
|
3. Commit/pusha ändringarna när du är nöjd.
|
||||||
|
|
||||||
|
## Snabb återstart nästa gång
|
||||||
|
|
||||||
|
Kör:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git status
|
||||||
|
git diff -- flutter/lib/core/utils/display_labels.dart \
|
||||||
|
flutter/lib/features/inventory/presentation/swipeable_inventory_tile.dart \
|
||||||
|
flutter/lib/features/pantry/presentation/pantry_screen.dart \
|
||||||
|
flutter/lib/features/admin/presentation/admin_products_panel.dart \
|
||||||
|
TEKNISK_BESKRIVNING.md
|
||||||
|
```
|
||||||
|
|
||||||
|
Och därefter:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd flutter
|
||||||
|
flutter analyze lib/core/utils/display_labels.dart \
|
||||||
|
lib/features/inventory/presentation/swipeable_inventory_tile.dart \
|
||||||
|
lib/features/pantry/presentation/pantry_screen.dart
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user