Skip to content

v2.12.3 — search that finishes the thought - #70

Merged
kostyk348 merged 1 commit into
mainfrom
feat/v2.12.3-search-qol
Nov 8, 2026
Merged

kostyk348 merged 1 commit into
mainfrom
feat/v2.12.3-search-qol

Conversation

@kostyk348

Copy link
Copy Markdown
Owner

Report

QoL wave on top of the interactive-graph merge (PR #69). Rule of the wave: break nothing — 336 headless tests green, clippy clean.

Added

  • Create a page straight from the search field. Empty results now offer «Создать страницу “<запрос>”» — click, or just Enter. The page is created with the typed title via the same create_page_titled path wiki-links use; the search clears and the caret lands in the new page's subject.
  • Esc empties the sidebar search (field focused → first Esc clears, next Esc reaches global handlers unchanged).

Changed

  • The «изменено N назад» stamp shows the absolute local timestamp on hover (dd.mm.yyyy hh:mm).
  • Enter over a non-empty result list opens the top result through a frame-start focus probe — the old mid-frame probe saw the field as already blurred on the Enter frame and silently dropped the keystroke.

Notable egui lessons (encoded in comments)

  • A singleline TextEdit surrenders focus while still processing an incoming Escape — memory.focused() is already empty when widgets draw; the field's focus is remembered from the previous frame.
  • Response methods share the context RwLock: reading response.has_focus() inside a data_mut closure deadlocks (the test caught it: «Failed to acquire RwLock write after 10s»).

Tests

336 passed: new enter_in_empty_search_requests_page_creation, escape_clears_a_focused_search_without_creating, edited_stamp_format.

Type

  • Feature (QoL) — no format impact

…ery, absolute date on the edited stamp (v2.12.3)

A small QoL wave on top of the interactive-graph merge, nothing broken:
336 headless tests green, clippy clean.

- No-results search now offers "Создать страницу \u201c<query>\u201d" (click or
  Enter) — the page is created with the typed title via the same
  create_page_titled path wiki-links use, the search clears, and the
  caret lands in the new page's subject (focus flag consumed by the
  document view).
- Esc with the field focused empties the query; the next Esc reaches the
  global handlers. Two egui lessons encoded in comments: a singleline
  TextEdit surrenders focus while still processing the Escape, so the
  field's focus is remembered from the previous frame in temp memory;
  and the stored flag is read before taking the context write lock,
  because Response methods share that RwLock (nesting them deadlocked,
  caught by the test as 'Failed to acquire RwLock write after 10s').
- The 'edited Nm ago' stamp shows the absolute local timestamp
  (dd.mm.yyyy hh:mm) on hover; formatting is extracted to
  NativeApp::edited_absolute_stamp with a format test.
- Enter over a non-empty result list opens the top result through the
  same frame-start focus probe — the old mid-frame probe observed the
  field as already blurred on the Enter frame and dropped the keystroke.

New tests: enter_in_empty_search_requests_page_creation,
escape_clears_a_focused_search_without_creating, edited_stamp_format.
@kostyk348
kostyk348 merged commit 667e26a into main Nov 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant