# fix\(sessions\): preserve cards and correct activity ages \(\#554\) · lucenx/codexbar-plasma

[View on GitCafe](https://git.cafe/lucenx/codexbar-plasma/commit/98664e885b2bf2ace2b12bdca3691594cbeef969)

Repository: [lucenx/codexbar-plasma](https://git.cafe/lucenx/codexbar-plasma)

Visibility: public

Requested revision: 98664e885b2bf2ace2b12bdca3691594cbeef969

Requested commit: 98664e885b2bf2ace2b12bdca3691594cbeef969

Commit: 98664e885b2bf2ace2b12bdca3691594cbeef969

Tree: 07cec9eca300fa79167bad3dc9fe5aaf61d77476

Author: Simone

Committer: GitHub

## Message

```
fix(sessions): preserve cards and correct activity ages (#554)

* fix(sessions): keep cards in place across rescans

An open Sessions tab rescans every 30 seconds and each scan delivers a new
array. The Repeater used that array as its model, so every rescan destroyed
and recreated all cards: a hovered card flickered and keyboard focus on its
copy action was lost. The Repeater now counts sessions and each card binds
its entry by index, so a same-size rescan rebinds cards in place.

Session ages also restart from each scan instead of a clock captured before
the data arrived, which understated ages by up to 30 seconds. A `working`
session is highlighted like the other live states, and the refresh policy
parses its stale age in one place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(sessions): clarify rescan stability and refresh screenshot

Same-size scans preserve cards by list position; count changes recreate them. Refresh the synthetic screenshot to show ages from the corrected scan clock. Documentation impact: usage and development guides and Unreleased now match the implemented behavior. TODO remains unchanged because this fixes existing Sessions behavior and does not complete any tracked parity gap.

* test(sessions): verify focus and live state colors at runtime

Exercise all supported live labels and preserve pointer hover and copy-button keyboard focus through a same-size rescan. Replace duplicated source assertions with behavior checks. Documentation impact: existing guides already describe this behavior; no TODO parity entry is completed.

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
```

## Parents

- [9fbae415cba6b0fadddfa8a3fd5632fdc96707fb](https://git.cafe/lucenx/codexbar-plasma/commit/9fbae415cba6b0fadddfa8a3fd5632fdc96707fb?format=markdown)

[Source at this commit](https://git.cafe/lucenx/codexbar-plasma/tree/98664e885b2bf2ace2b12bdca3691594cbeef969?format=markdown)
