diff --git a/AGENTS.md b/AGENTS.md index d4eb4b7..f1314c8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -60,7 +60,9 @@ Re-filing a note has **three entry points, and they are not equivalent**. `File Drag-and-drop is the third path and **does work on touch** — this was previously documented here as impossible, which was wrong. On a touch screen the gesture is a *long press* rather than an immediate drag, verified working on iOS 18.7 / Firefox 156. It is not universal: it requires JS, and in engines without touch support for HTML5 drag the same gesture scrolls the sidebar instead. So a phone's three paths are all live; do not assume drag is desktop-only when adding UI around it. -Two touch-specific details follow from the long press. `.note-item` sets `-webkit-touch-callout: none` so Safari's long-press menu does not compete with the gesture, while leaving `user-select` alone so preview text stays copyable. And the `dragstart` text-selection guard in `app.js` is gated on `matchMedia('(hover: hover)')` — a long press creates a selection *before* the drag starts, so an ungated guard cancels the gesture itself. `.folder-nav` is `position: sticky` inside the scrolling `.sidebar` on desktop, because nothing auto-scrolls a nested overflow container mid-drag and the folders are the drop targets. On mobile, the sidebar does not scroll; instead `.folder-nav` and `.note-list` each scroll independently within their own bounded areas, and the pull-tab toggle stays visible above the scrolling folder list. +The folder nav is a one-row `
` disclosure: the `` names the current folder and the existing `") + .expect("the folder picker summary should close"); + &rest[..end] +} + /// Counts the badges inside one nav item's link. /// /// Returns `None` when the label is not in the nav at all, so a test can tell @@ -2762,6 +2836,18 @@ async fn hiding_folder_nav_refreshes_sidebar_to_all_notes() { !refresh_fn.contains("location.reload"), "refreshSidebarToAllNotes should not reload the page" ); + assert!( + refresh_fn.contains(".folder-picker-summary"), + "refresh should update the picker summary" + ); + assert!( + refresh_fn.contains(".file-menu-dropdown form[action$=\"/notes\"] input[name=\"folder\"]"), + "refresh should update the File menu New Note form" + ); + assert!( + !refresh_fn.contains(".toolbar input[name=\"folder\"]"), + "the stale toolbar folder selector should be gone" + ); } /// GET a path and return its status and body.