SIGN IN SIGN UP
openai / codex UNCLAIMED

Lightweight coding agent that runs in your terminal

0 0 1 Rust

[draft] Add early proposal for sort order for thread/list

To improve performance on connection/reconnection to a remote appserver, we want to allow for delta syncs of the thread list, so that you only get what updated since you last connected (in short reconnections, expected to be zero items).  This requires adding an ascending sort option to the thread search (both the sqlite DB query and the filesystem-based query), and then adding a slightly different sortkey for the ascending sort to efficiently support these delta syncs.

Note: This was codexed up, though iterated on a few times to make the implementation as clean as made sense to my untrained eye (not used to this codebase).  There's still models at a few layers for the sortdirection that feel ugly but seems consistent with other search parameters so may be fine.  The biggest ugliness is in the non-sqlite filesystem-backed query mode, where the ascending sort is pretty gross, but I don't think there's a better answer there, and it seems like that path is an edge case.
D
David de Regt committed
d5dcaa6f7a6a7723deb4b3d820974ab208df83dc
Parent: 26a28af