Refactor timestamp handling for activity sorting

Introduce `last_recording_at` to `OnelinerEntry` and use it as the
primary sort key for cases. This ensures that cases with recent
dictation activity are prioritized, even if their initial creation date
is older.

The logic for determining a case's activity has been updated to consider
the most recent `.m4a` file's modification time (`last_recording_at`),
falling back to `updated_at` or `created_at` if necessary.

This change also refactors the timestamp formatting and handling within
the web interface to correctly display and sort cases based on their
actual last activity time, improving user experience and data relevance.
The `now_rfc3339` function is updated to strip sub-second precision for
consistent filename generation.
This commit is contained in:
2026-04-18 11:33:35 +02:00
parent 7637596598
commit cdfa5ae90e
11 changed files with 286 additions and 56 deletions
+1
View File
@@ -12,6 +12,7 @@
## Rust
* Ich bevorzuge Rust, vor allem für Business-Logik. (Das heißt nicht, dass z.B. JS in HTML böse ist!)
* Halte dich and Best Practices und Rust-Style-Guidelines.
* Ich bin sehr erfahren mit Delphi und verstehe auch funktionale Sprachen. Rust ist neu für mich. Erkläre alles, was Rust von Delphi unterscheidet.
* Performance: Bevorzuge `Rc<dyn Trait>` + lokales `downcast_ref` gegenüber Deep Copies via `Rc::new(obj.clone())`.