Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
address review (antigravity): re-key the single-session read too
[._.]/ Adam Eivy3a5bc7c46af6
diff --git a/server/services/meatspacePost.js b/server/services/meatspacePost.jsindex 503e5dd44a..a56ec5d749 100644--- a/server/services/meatspacePost.js+++ b/server/services/meatspacePost.js@@ -263,9 +263,16 @@ export async function getPostSessions(from, to, options) {return sessions;}+/**+ * One session by id, with the same re-derived `date` the list view gets (#4168)+ * — otherwise the detail drawer would quote the frozen write-time day while the+ * history row beside it shows the re-keyed one.+ */export async function getPostSession(id) {const data = await loadSessions();- return data.sessions.find(s => s.id === id) || null;+ const session = data.sessions.find(s => s.id === id);+ if (!session) return null;+ return { ...session, date: recordDayKey(session, await getUserTimezone()) };}export async function submitPostSession(sessionData) {diff --git a/server/services/meatspacePost.test.js b/server/services/meatspacePost.test.jsindex a960de0156..5cfd967cb1 100644--- a/server/services/meatspacePost.test.js+++ b/server/services/meatspacePost.test.js@@ -48,6 +48,7 @@ import {getAdaptivePreview,getPostStats,getPostSessions,+ getPostSession,deriveTaskAccuracy,deriveTaskCompletion,getCognitiveProgress,@@ -1591,6 +1592,14 @@ describe('POST readers re-derive day keys after a timezone change (issue #4168)'expect(await getPostSessions('2026-07-18', '2026-07-18')).toHaveLength(1);});+ it('getPostSession re-keys the single record the same way the list does', async () => {+ freezeAt('2026-07-18T12:00:00Z', 'UTC');+ mockHistory(laHistory.map((s, i) => ({ ...s, id: `s${i}` })));+ const session = await getPostSession('s1');+ expect(session.date).toBe('2026-07-18');+ expect(await getPostSession('missing')).toBeNull();+ });+it('leaves a legacy record with no instant on its authored day', async () => {// Pre-timestamp history carries only a day label — there is nothing to// re-derive from, so it must stay put rather than vanish from the stats.