Skip to content

Recently Closed sidebar section is not sorted by recency #1191

Description

@amrmelsayed

Problem

The Recently Closed view in the Codev sidebar displays items in whatever order GitHub's search API returns them, which is relevance ("best match"), not closure time. Verified empirically: an issue closed at 08:00Z today renders last, below items closed the previous day.

Root cause

No layer in the chain applies an ordering:

  1. apps/vscode/src/views/recently-closed.ts renders data.recentlyClosed as-is.
  2. packages/codev/src/agent-farm/servers/overview.ts (recently-closed assembly, ~line 941) maps the fetched list in order, preserving it.
  3. fetchRecentlyClosed in packages/codev/src/lib/github.ts filters to the 24h window but does not reorder.
  4. packages/codev/scripts/forge/github/recently-closed.sh runs gh issue list --state closed --search "closed:>$SINCE" with no sort: qualifier. The presence of --search delegates to GitHub's search API, whose default ordering is relevance.

Proposed fix

Sort by closedAt descending in overview.ts where the recentlyClosed items are assembled. This fixes the ordering for every forge at once (closedAt is already present on every item), rather than patching each provider-specific forge script (github/gitlab/gitea/linear) with a sort: qualifier.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/vscodeArea: VS Code extension

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions