BBRUNER Patrickrefactor: one offered-encoding list, in EncodingRegistry
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
refactor: split ILogWindow into role interfaces Candidate 3 of the 2026-07-26 architecture review. ColumnizerCallback and FilterPipe took the whole ILogWindow for a fraction of it, so Core fakes had to implement the full interface. Carve role interfaces sized to each Core consumer: - ILogLineSource (LineCount, GetLineMemory, GetCurrentFileName) — the columnizer callbacks and, as the Core face of the paint context, the UI's ILogPaintContextUI. The empty ILogPaintContext marker is deleted and IFileViewContext.LogPaintContext retyped to it. - ILineSelectable (SelectLine) — FilterPipe.OriginWindow (was LogWindow). - ISessionSnapshotSource (GatherSessionSnapshot) — FilterPipe.ResultWindow (was OwnLogWindow). ILogWindow survives as the empty composition of the three, kept only for identity holders (the filter-list / highlight-group changed event args). Six members that had no interface-typed caller were dropped from it; the dead GetLogLineMemoryWithWait was removed from LogWindow. New ColumnizerCallbackTests pin both callbacks against a hand-rolled three-member ILogLineSource fake — no Log Window, no Logfile Reader. CONTEXT.md gains the Log Window roles section. | 1 个月前 | |
refactor: one offered-encoding list, in EncodingRegistry The Preferences default-encoding combo box and the View > Encoding menu each carried their own list of encodings, and they had drifted: the menu lacked windows-1250 and windows-1252, and carried an "ANSI" row that the combo did not. Adding GB2312 for #688 meant editing both, plus a third place - the check-state lookup that maps the encoding a file is read with back onto a menu row. EncodingRegistry.OfferedEncodings is now the one list, and it documents the invariants both UIs depend on (resolvable by its own header name, no two entries sharing a code page, append rather than sort). Adding an encoding is a one-line change there. The menu rows are built from it at runtime by EncodingMenuBuilder rather than declared one by one in the designer. Each row carries the Encoding it stands for in its Tag, so the click handler applies whatever the clicked row carries (one handler, was five) and the check-state lookup compares against it (was a cascade naming every encoding). Rows are labelled with their header name, the same text the combo box shows, which retires five resource keys that were dead anyway - the constructor overwrote them before anyone saw them. Also fixes what GB2312 exposed in the legacy and XML readers, which advance their position per character by a per-encoding step: GetPosIncPrecomputed credited every encoding that is not UTF-8 or UTF-16 with one byte per character. GB2312 is the first offered encoding that is neither single-byte nor Unicode, so the position drifted on the first Chinese character and every later line began at the wrong offset. The step is now keyed on Encoding.IsSingleByte, and 0 ("measure the character") covers the variable-width case. Test coverage follows the seam: the list invariants are asserted once against the registry instead of per dialog, and the menu fixture is filled by the real builder, so it can no longer describe a menu the application does not build. | 1 个月前 | |
unit tests no longer working fixed | 3 个月前 | |
refactor: split ILogWindow into role interfaces Candidate 3 of the 2026-07-26 architecture review. ColumnizerCallback and FilterPipe took the whole ILogWindow for a fraction of it, so Core fakes had to implement the full interface. Carve role interfaces sized to each Core consumer: - ILogLineSource (LineCount, GetLineMemory, GetCurrentFileName) — the columnizer callbacks and, as the Core face of the paint context, the UI's ILogPaintContextUI. The empty ILogPaintContext marker is deleted and IFileViewContext.LogPaintContext retyped to it. - ILineSelectable (SelectLine) — FilterPipe.OriginWindow (was LogWindow). - ISessionSnapshotSource (GatherSessionSnapshot) — FilterPipe.ResultWindow (was OwnLogWindow). ILogWindow survives as the empty composition of the three, kept only for identity holders (the filter-list / highlight-group changed event args). Six members that had no interface-typed caller were dropped from it; the dead GetLogLineMemoryWithWait was removed from LogWindow. New ColumnizerCallbackTests pin both callbacks against a hand-rolled three-member ILogLineSource fake — no Log Window, no Logfile Reader. CONTEXT.md gains the Log Window roles section. | 1 个月前 | |
Rename Project -> Session across code, resources, and locales Aligns code and resource names with the canonical terminology: .lxj = Session (persisted workspace) and .lxp = Session File (per-file state). The code and resource keys still used the legacy "Project" wording. Renamed: - Types: ProjectFileHandler/IProjectFileHandler -> SessionHandler/ ISessionHandler, ProjectData -> SessionData, ProjectPersister -> SessionPersister, ProjectLoadOutcome/Result/ValidationResult/ DlgResult -> Session*, ProjectFileResolver/Validator -> SessionFile*, ProjectLoadDlg -> SessionLoadDlg - Methods: LoadProject/SaveProject -> LoadSession/SaveSession, LoadProjectData -> LoadSessionData, ResolveProjectFiles -> ResolveSessionFiles, ValidateProject -> ValidateSession, OnLoadProjectToolStripMenuItemClick -> OnLoadSessionTool... - Properties/fields: ProjectFilePath -> SessionFilePath, _projectFileHandler -> _sessionHandler, _projectFileCallback -> _loadSessionCallback - Resource keys: LoadProject_UI_* -> LoadSession_UI_*, LogTabWindow_UI_Project_Session_Default_Filter -> LogTabWindow_UI_Session_Default_Filter, loadProjectToolStripMenuItem -> loadSessionToolStripMenuItem - Resource values updated in en/de/zh-CN: "Project Load Failed" / "Error loading project file" replaced; merged with existing SessionLoadFailed key (was a near-duplicate) Backward compatibility: - Existing .lxj files on disk continue to load: SessionData has [JsonProperty("ProjectFilePath")] pinning the JSON key, and the field is also re-set from the file path on load so even files without this key resolve correctly. - Behavior unchanged - no runtime semantics affected. | 3 个月前 | |
refactor: remove abandoned pre-beta Pattern analysis feature Deletes the orphaned fuzzy block-detection feature (PatternWindow) that has had no UI entry point for years and whose own label said it does not work. Removes: - PatternWindow.cs / .Designer.cs / .resx - LogWindow.cs: PatternStatistic (both overloads), PatternStatisticSelectRange, InitPatternWindow, TestStatistic, DetectBlock, FindSimilarLine, PrepareDict, AddBlockTargetLinesToDict, GetMsgForLine, the commented FindExistingBlock/ResetCache blocks, the _patternWindow/_patternArgs/_lineHashList fields and the PatternStatisticFx delegate - Supporting types PatternArgs, PatternBlock, QualityInfo (only referenced by the deleted code) - PatternWindow_UI_* resource strings (en/de/zh-CN + generated Designer) Util.YetiLevenshtein stays: public Core utility, potentially used by plugins. Successor idea captured in .scratch/log-template-mining-issue.md (Drain-style template mining). Ref: .scratch/pattern-analysis-deletion-issue.md Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> | 2 个月前 | |
update interfaces and a few more smaller fixes | 6 个月前 | |
refactor: one offered-encoding list, in EncodingRegistry The Preferences default-encoding combo box and the View > Encoding menu each carried their own list of encodings, and they had drifted: the menu lacked windows-1250 and windows-1252, and carried an "ANSI" row that the combo did not. Adding GB2312 for #688 meant editing both, plus a third place - the check-state lookup that maps the encoding a file is read with back onto a menu row. EncodingRegistry.OfferedEncodings is now the one list, and it documents the invariants both UIs depend on (resolvable by its own header name, no two entries sharing a code page, append rather than sort). Adding an encoding is a one-line change there. The menu rows are built from it at runtime by EncodingMenuBuilder rather than declared one by one in the designer. Each row carries the Encoding it stands for in its Tag, so the click handler applies whatever the clicked row carries (one handler, was five) and the check-state lookup compares against it (was a cascade naming every encoding). Rows are labelled with their header name, the same text the combo box shows, which retires five resource keys that were dead anyway - the constructor overwrote them before anyone saw them. Also fixes what GB2312 exposed in the legacy and XML readers, which advance their position per character by a per-encoding step: GetPosIncPrecomputed credited every encoding that is not UTF-8 or UTF-16 with one byte per character. GB2312 is the first offered encoding that is neither single-byte nor Unicode, so the position drifted on the first Chinese character and every later line began at the wrong offset. The step is now keyed on Encoding.IsSingleByte, and 0 ("measure the character") covers the variable-width case. Test coverage follows the seam: the list invariants are asserted once against the registry instead of per dialog, and the menu fixture is filled by the real builder, so it can no longer describe a menu the application does not build. | 1 个月前 | |
refactor: split ILogWindow into role interfaces Candidate 3 of the 2026-07-26 architecture review. ColumnizerCallback and FilterPipe took the whole ILogWindow for a fraction of it, so Core fakes had to implement the full interface. Carve role interfaces sized to each Core consumer: - ILogLineSource (LineCount, GetLineMemory, GetCurrentFileName) — the columnizer callbacks and, as the Core face of the paint context, the UI's ILogPaintContextUI. The empty ILogPaintContext marker is deleted and IFileViewContext.LogPaintContext retyped to it. - ILineSelectable (SelectLine) — FilterPipe.OriginWindow (was LogWindow). - ISessionSnapshotSource (GatherSessionSnapshot) — FilterPipe.ResultWindow (was OwnLogWindow). ILogWindow survives as the empty composition of the three, kept only for identity holders (the filter-list / highlight-group changed event args). Six members that had no interface-typed caller were dropped from it; the dead GetLogLineMemoryWithWait was removed from LogWindow. New ColumnizerCallbackTests pin both callbacks against a hand-rolled three-member ILogLineSource fake — no Log Window, no Logfile Reader. CONTEXT.md gains the Log Window roles section. | 1 个月前 | |
Organize solution and project files to be more streamlined | 1 年前 | |
optimizations | 9 个月前 | |
missing resources link | 9 个月前 |