feat: sort results by last accessed time within each mode

Tabs sorted by lastAccessed, history by lastVisitTime, closed tabs by
lastModified. Search uses recency as tiebreaker for equal scores.

Assisted-by: Claude Code
Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
This commit is contained in:
2026-04-22 15:03:22 +05:30
parent 669d39e1dd
commit db9d63660c
6 changed files with 22 additions and 20 deletions
+2
View File
@@ -7,6 +7,7 @@ declare namespace chrome {
url?: string;
favIconUrl?: string;
active?: boolean;
lastAccessed?: number;
}
function query(queryInfo: Record<string, unknown>): Promise<Tab[]>;
function get(tabId: number): Promise<Tab>;
@@ -42,6 +43,7 @@ declare namespace chrome {
namespace sessions {
interface Session {
lastModified?: number;
tab?: tabs.Tab & { sessionId?: string };
window?: { sessionId?: string };
}