Repository navigation
feat(qt): add bounded literal Find to main screen and history - #325
Merged
JavaZeroo merged 8 commits intoNov 6, 2026
Merged
Conversation
Add Ctrl+Shift+F, a current-session Find panel with query focus, Previous/Next/ Close buttons, a Match case toggle and status text. Reuse TextSearch's bounded literal policy (4096 UTF-8 byte query, 1024-result cap, ASCII case folding, existing loop/truncation statuses) in incremental timer slices. Hits stay source-positioned; navigation reveals the source row through HistoryViewport and highlights via the current ViewMapping, so display row numbers are never stored. Escape closes the panel and restores terminal focus. Add a formal Qt regression with the deterministic selection fixture: public shortcut/query, history reveal, source hit and painted spans, Previous/Next, no-match status, Escape focus restoration and query limit. No system clipboard, paste, BCD/VM or new search semantics are changed.
Add the Find implementation/verification record, source and test identity, the captured offscreen panel image, and converge FEATURES/EVIDENCE on the bounded capability. Keep selection, TUI/alternate-screen Find, physical presentation, DPI and performance outside the claim.
5 tasks
Open
Add multiple-match source/order/wrap assertions with exact painted width, history and current-page reveal, narrow/wide source migration, eviction non-resurrection, epoch invalidation, two real sessions with independent input recording, zero query leakage and post-Escape input targeting. Exercise empty query, actual Match case, 4097-byte/Chinese/NFD over-limit rejection without silent truncation, and Return/F3/Shift+F3. Make the query field stop silently truncating at 4096 units; TextSearch now rejects the exact UTF-8 byte limit with an explicit status. Add F3/Shift+F3 to the existing Next/Previous contract. The test-only selection child can record received input bytes; no product clipboard/desktop is touched.
Use the formal query entry for ASCII keyboard and Qt input-method commit text: legal 4096-byte and >4096 Chinese/NFD inputs preserve the full text and show the explicit limit without silent truncation, with zero child-input leakage. Add a third real child with bounded deterministic output: repeated short literals exceed 1024 non-overlapping hits, exercising the Qt capped notice and finite first/last wrap; a >4096-byte scan keeps an observable Searching stage with partial hits, and public navigation stays inside the scanned prefix instead of wrapping into unscanned output. Pacing is a test-only timer setting; product budgets and caps are unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
#29 主线已有
TextSearch、TextDocument、HistoryViewport、ViewMapping和历史/源选择。本切片把既定的有界字面量 Find 接入正式 Qt 正常主屏与历史显示页,不新增搜索语义,不依赖粘贴 #324。内容
Ctrl+Shift+F打开当前会话 Find 面板;查询框取得焦点,Previous/Next/Close 按钮、Match case 开关和状态文本。TextSearch状态。TextSearch::step的 4096 单位预算在计时器切片中推进,不一次扫描整个文档;输出变化通过notify_change失效并重扫。TextPosition,通过HistoryViewport::reveal定位历史/当前页,当前ViewMapping投影高亮;不保存显示行号。验证
qt_find:Ctrl+Shift+F 实际按键、查询焦点、确定性 child 的SEL_SOFT_源命中、历史 reveal、高亮投影、Previous/Next、无命中、Escape 焦点恢复、4096 查询上限。qt_find1/1),未触个人剪贴板/桌面。边界