The open-source app everyone uses to manage agents at work
TypeScript acpxagent-orchestrationagent-skillsagentic-aiai-agentsai-engineeringai-governanceai-toolsautonomous-agentsclaudeclaude-codeclaude-skillscodexhermesllmmcpmulti-agentopenclawproject-managementworkflow-automation
Fix inbox ordering: self-touched issues no longer sink to bottom (#2144)
Devin Foleydedd972e3df4
diff --git a/ui/src/lib/inbox.test.ts b/ui/src/lib/inbox.test.tsindex a67a7451f6..9befeaa0c8 100644--- a/ui/src/lib/inbox.test.ts+++ b/ui/src/lib/inbox.test.ts@@ -345,6 +345,26 @@ describe("inbox helpers", () => {]);});+ it("sorts self-touched issues without external comments by updatedAt", () => {+ const recentSelfTouched = makeIssue("recent", false);+ recentSelfTouched.lastExternalCommentAt = null as unknown as Date;+ recentSelfTouched.updatedAt = new Date("2026-03-11T05:00:00.000Z");+ recentSelfTouched.myLastTouchAt = new Date("2026-03-11T05:00:00.000Z");++ const olderCommented = makeIssue("older", false);+ olderCommented.lastExternalCommentAt = new Date("2026-03-11T03:00:00.000Z");++ const items = getInboxWorkItems({+ issues: [olderCommented, recentSelfTouched],+ approvals: [],+ });++ expect(items.map((i) => (i.kind === "issue" ? i.issue.id : ""))).toEqual([+ "recent",+ "older",+ ]);+ });+it("can include sections on recent without forcing them to be unread", () => {expect(shouldShowInboxSection({diff --git a/ui/src/lib/inbox.ts b/ui/src/lib/inbox.tsindex e86a02eed9..e42152a2c1 100644--- a/ui/src/lib/inbox.ts+++ b/ui/src/lib/inbox.ts@@ -148,11 +148,7 @@ export function issueLastActivityTimestamp(issue: Issue): number {const lastExternalCommentAt = normalizeTimestamp(issue.lastExternalCommentAt);if (lastExternalCommentAt > 0) return lastExternalCommentAt;- const updatedAt = normalizeTimestamp(issue.updatedAt);- const myLastTouchAt = normalizeTimestamp(issue.myLastTouchAt);- if (myLastTouchAt > 0 && updatedAt <= myLastTouchAt) return 0;-- return updatedAt;+ return normalizeTimestamp(issue.updatedAt);}export function sortIssuesByMostRecentActivity(a: Issue, b: Issue): number {