Skip to content

(index): an append that leaves a transcript's mtime unchanged is not reindexed for unlinked and subagent rows #740

Closed

Description

@devsuitup

Defect (plausible, not reproduced)

session-cache.js:536 skips a row on refresh when its fileMtime matches the recorded one and the row has no continuationIndex or has a parentSessionId (subagent rows). On Windows an append can leave the transcript's mtime unchanged (the effect behind #738). Such an append is then not reindexed until a later write moves the mtime, so the last write of a session can leave its sidebar row (message count, preview, timestamps) stale.

Linked rows are not affected: they also compare the continuation stamp (dev, ino, birthtime, mtimeNs, size), so growth is seen without an mtime change.

Found by

Review of #739 (#738). Not the cause of #738.

Expected

A row whose transcript grew is refreshed even when its mtime did not advance — e.g. compare size alongside fileMtime for unlinked and subagent rows. Test: grow a transcript with its mtime pinned back; the row is reindexed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions