Search and tags look through the Archive, and archived cards say so
A search or a tag filter on the main board, and a tag's own view, now list every note not in Trash (a new `all` board view on the server and in the core), so finished work can still be looked up. Archive and Trash keep a search inside themselves. An archived note met anywhere but the Archive carries an "Archived" chip at the top of its card, on the web and on Android. Task #6315. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -355,6 +355,9 @@ pub fn list_notes(conn: &Connection, q: &ListQuery) -> rusqlite::Result<Vec<Note
|
||||
// without turning up in their Trash, where they could do nothing with it.
|
||||
"trash" => "trashed = 1 AND permission = 'owner'",
|
||||
"archived" => "trashed = 0 AND archived = 1",
|
||||
// The board and the Archive together: what a search or a tag looks through,
|
||||
// so finished work stays findable after it has been put away.
|
||||
"all" => "trashed = 0",
|
||||
_ => "trashed = 0 AND archived = 0",
|
||||
});
|
||||
|
||||
@@ -1495,6 +1498,11 @@ mod tests {
|
||||
ids(&list(&conn, json!({"view": "trash"}))),
|
||||
vec![trashed.id.as_str()]
|
||||
);
|
||||
let mut all = ids(&list(&conn, json!({"view": "all"})));
|
||||
all.sort();
|
||||
let mut expected = vec![kept.id.as_str(), archived.id.as_str()];
|
||||
expected.sort();
|
||||
assert_eq!(all, expected);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user