activity: global feed, per-case log, sidebar section, today UX

- migration 009: target_type, target_id, target_path columns
- new Event fields: TargetType, TargetID, TargetPath
- ListActivityFeed (paginated global), ListActivityByNode (per-case)
- all Record() callsites pass target info
- frontend: Активность sidebar section with chronological feed
- per-case Активность tab with real data (was placeholder)
- today events: clickable, target-type badges, event counts
This commit is contained in:
2026-06-01 02:53:56 +08:00
parent 5a1c4c6d7f
commit 3672e3133b
6 changed files with 305 additions and 84 deletions
@@ -0,0 +1,8 @@
package storage
// migration009 — add target_type, target_id, target_path to activity_events.
const migration009 = `
ALTER TABLE activity_events ADD COLUMN target_type TEXT;
ALTER TABLE activity_events ADD COLUMN target_id TEXT;
ALTER TABLE activity_events ADD COLUMN target_path TEXT;
`
+1
View File
@@ -65,6 +65,7 @@ var migrationFiles = map[int]string{
6: migration006,
// 7: migration007 (FTS5) — created lazily by search.Rebuild()
8: migration008,
9: migration009,
}
func (db *DB) runInitialSchema() error {