Skip to content

[Bug] Sidebar session timestamp shows creation time instead of last user message time #470

@Astro-Han

Description

@Astro-Han

Summary

In the PawWork sidebar, the relative timestamp displayed to the right of each session name shows the session creation time (session.time.created) instead of the time of the last user message. This causes sessions to appear stale even when the user just sent a new message.

Root Cause

packages/app/src/pages/layout.tsx builds the sidebar session list with:

const rows = pawworkSessionWindow().sessions.map((session) => ({
  session,
  slug: base64Encode(session.directory),
  projectLabel: projectLabelForSession(session),
  created: session.time.created,   // <-- uses session creation time
}))

The pawworkSidebarSessionTime helper already exists in packages/app/src/pages/layout/pawwork-session-source.ts and correctly computes the timestamp by looking for the latest user message and falling back to session creation time. However, layout.tsx never calls it.

Steps to Reproduce

  1. Open PawWork and create a new session.
  2. Send a message in that session.
  3. Wait a few minutes.
  4. Send another message in the same session.
  5. Look at the sidebar — the timestamp next to the session name still reflects the original creation time, not the most recent user message time.

Expected Behavior

The sidebar timestamp should reflect the time of the last user message (or session creation time if there are no user messages yet).

Actual Behavior

The sidebar timestamp always reflects the session creation time, making it appear as if no new activity has occurred.

Affected Area

  • App flow or product behavior

Impact

  • Breaks an important workflow

Version

N/A (observed in current dev branch)

OS

macOS / Windows (affects both)

Reproducible

Yes, every time

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High priorityappApplication behavior and product flowsbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions