I asked Cursor for the best of both worlds:
Each line can be grouped if there are multiple states from the same sensor in a row.
I do the same with Fable on the criticism I had for him to get the best version of each side.
We’ll be able to compare
The post-patch version of Fable 5:
Good thing, though I blew my afternoon Claude quota with all this
I also prefer the Fable 5 design, but it’s really just a small difference.
However, I see that it only handles one date field. And it’s true that Cursor’s proposal for dates was better.
Lol, yeah, it stings ^^ And impossible to share it …
It’s true that when testing the Fable 5 design in real life, I ultimately find it more comfortable to use.
So it’s actually quite interesting, when you select a date, you « jump » to the date but you can see the days around it, so it’s super practical!
pierre-gilles:
It’s actually quite interesting, when you select a date, you “jump” to that date but you can still see the days around it, so it’s really handy!
True, you’ll see when you use it, but yes, it’s an interesting idea.
Does the top-of-page filter remain sticky at the top, though?
The date remains sticky but not the filters:
Oh yes ^^ No, on my end, I was more referring to the page header with the filters + dates + search:
Because when you search in a history log, you like to be able to filter quickly ^^
Yes I agree. I’ll start again as soon as I have credit again Claude Code
You really went all out given the number of PRs opened today
@Terdious the header is now sticky, but only the device type selection.
I tested it and it’s really clean!
Sticky — yes, I think it’s a good idea, but not for the entire header: date + room + search sticky would take up ~140px of height on mobile, almost a fifth of the screen. What I did:
the filter bullets by category remain stuck at the top when scrolling (a single compact, horizontally scrollable line, with an opaque background) — it’s the tool we use the most while browsing the feed;
the day headers stick just below , so while scrolling we always see « which day » + « which filters »;
search and date remain at the top of the page — we access them with a quick scroll, and the « Return to Live » button / the « N new events » badge remain floating anyway.
So, I think we’re going with Fable 5’s proposal!
The PR:
master ← claude/smart-home-activity-history-h5lrne
ouvert 01:06PM - 03 Jul 26 UTC
### Pull Request check-list
To ensure your Pull Request can be accepted as fast… as possible, make sure to review and check all of these items:
- [x] If your changes affect the code, did you write the tests? (8 new server tests: lib + controller)
- [x] Are tests passing? (`npm test` device suites: 261 passing; front has no unit-test script)
- [x] Is the linter passing? (`npm run eslint` on both front/server)
- [x] Did you run prettier? (both front/server, all files pass `prettier --check`)
- [x] If you are adding a new feature/service, did you run the integration comparator? (`npm run compare-translations` on front — en/fr/de complete)
- [ ] Did you test this pull request in real life? With real devices? (tested end-to-end with a seeded local instance — screenshots below workflow; not yet with real devices)
- [x] If your changes modify the API (REST or Node.js), did you modify the API documentation? (apidoc comments added on the new endpoint)
- [ ] If you are adding a new features/services which needs explanation, did you modify the user documentation?
- [x] Did you add fake requests data for the demo mode (`front/src/config/demo.js`) so that the demo website is working without a backend?
### Description of change
This PR adds a new **Activity** page (`/dashboard/history`, new "Activity" tab in the header) that shows a live, visual timeline of everything happening in the home: doors opening, motion detected, lights turned on/off, sensor values… It is designed to stay readable even for homes with 100–200 devices reporting states continuously.
**Front (the main part):**
- Visual timeline grouped by day ("Today", "Yesterday", then full dates), with a colored icon per event family, device name, human-readable action ("Opened", "Motion detected", "Turned on", "21.5 °C"…), room badge and time.
- **Burst grouping**: consecutive states of the same device feature are collapsed into a single line with a `×N` badge, expandable to see each timestamped occurrence — this is what keeps the feed readable with chatty sensors.
- Filter chips by event family (Openings, Motion & presence, Buttons & remotes, Lights & switches, Climate, Safety, Energy, Other), room selector and device search (server-side filtering, debounced).
- **Real-time**: new states arrive live through the existing websocket. When the user has scrolled down, events are not inserted (the content would move under their eyes): a floating "N new events" pill appears and scrolls back to top on click.
- Infinite scroll with cursor pagination (IntersectionObserver + "Load more" fallback), empty state, mobile responsive, en/fr/de translations, demo mode data.
**Server:**
- New endpoint `GET /api/v1/device_feature/states_history`: returns recent device states across all devices from DuckDB, most recent first, decorated with device feature / device / room metadata. Supports cursor pagination (`before` / `take`, capped at 500) and `categories` / `room_id` / `search` filters. The query is always constrained to existing device feature ids, so states of deleted features never consume rows of a page.
Screenshots (local instance with seeded data):
- Desktop timeline with live badge, filter chips and day sections
- "Openings" filter with ×N burst grouping and expandable occurrences
- Mobile view
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_012ZHMk4de6U51BGf6gnNqiR
---
_Generated by [Claude Code](https://claude.ai/code/session_012ZHMk4de6U51BGf6gnNqiR)_
## Summary by CodeRabbit
* **New Features**
* Added an Activity/History timeline at `/dashboard/history` with day grouping (“today/yesterday”), room/category filtering, search, live “new events” buffering, and infinite loading.
* Added an authenticated API endpoint to retrieve device feature state history with cursor pagination (including optional `before_id`).
* Extended demo data with rooms and historical device feature state events.
* **Documentation**
* Added/updated History page and navigation i18n strings across supported languages, including device value labels.
* **Tests**
* Added backend/controller and library tests covering metadata, filtering, ordering, pagination, and edge cases.
If anyone wants to test it, it’s possible this morning or at lunchtime. Otherwise, I plan to merge in the early afternoon.
As I mentioned earlier, this is a low-risk development: it’s purely a cosmetic update. We’ll be able to continue improving it even after it’s in production, since there are no changes to the data model.
Thanks to Claude Fable 5 for this implementation!
Great, it’s merged, it will be included in the next version of Gladys
This feature is available in Gladys Assistant 4.82:
Salut à tous,
Je sors aujourd’hui ce qui est, pour l’instant, l’une des plus grosses releases de l’année, et il y a une vraie raison à ça.
On est clairement à un tournant dans la façon de développer : les modèles d’IA gagnent en puissance, et les outils pour s’en servir au quotidien deviennent enfin matures. Depuis deux semaines, deux d’entre eux ont changé ma manière de travailler sur Gladys.
Claude Fable 5, le modèle phare d’Anthropic, celui qui a été temporairement restreint aux États-Unis…
Thanks to everyone for your help and feedback