Dictionary: update an existing phrase instead of saving conflicting duplicate rules
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
Start with Dictionary mutation in Sources/LocalVoice/AppModel.swift, then read the identity and validation logic in CorrectionRule.swift and sequential replacements in TextPrimitives.swift; inspect the Dictionary UI in Views.swift and the related work in #164. Verify the actual add/update route, both Dictionary and Remember validation, and isolated duplicate recovery; done means updates preserve rule identity/order, legacy conflicts require explicit resolution, and native acceptance leaves no fixture in user data.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Outcome and priority
P2 functional defect. Saving a corrected spelling for an existing phrase should update that phrase deliberately, rather than leave two contradictory rules where the old spelling wins.
Evidence
Preview 2.3.0, build 20260928054038, clean source 00be555139f87d4557f48fcffc132b8621c251a2; macOS 26.5.1 (25F80), built-in display. Verified through Copy build details in the running app and bundle metadata.
Source plus an isolated execution of production code: Dictionary Add only trims/checks nonempty and appends (AppModel). A temporary Swift harness used the exact TextPrimitives.swift and CorrectionRule.swift from the installed commit with two synthetic rules:
- qa velcor 928 → VelcorOne928
- QA VELCOR 928 → VelcorTwo928
TextRules.apply returned Please ask VelcorOne928 tomorrow. The later intended spelling was ignored. CorrectionRule.propose for that phrase then returned duplicateRules with count 2.
The worker ran the interpreter in an isolated temporary directory; it did not build/launch Workbench or touch the live dictionary. Parent inspected the exact mutation and rule-application paths. Native inspection additionally found Add enabled for identical Heard and Write text; those unsaved fields were cleared. No real saved rule was added or removed.
Starting points: sequential replacements, Dictionary UI, existing correction validation and identity.
Chosen behaviour
Use the same phrase identity and validation in Dictionary and Remember correction. An exact existing pair is idempotent. A different output for the same case-insensitive phrase shows the current value and an explicit Update action; updating preserves the rule ID and unrelated order.
Legacy contradictory duplicates remain intact until an explicit focused resolution chooses the desired output. Show the conflicting values so people can resolve them without guessing rule order. Do not replay unrelated rules into the current transcript just because a future dictionary rule changed.
Acceptance
- Exact re-adds and changes only to Heard casing do not create duplicate entries. Changes to Write casing can be intentional and offer Update, preserving the exact chosen output.
- Update changes future TextRules output to the chosen spelling and retains rule identity/order.
- Dictionary and Remember correction agree on no-op, newline/control, empty and oversized validation.
- Legacy duplicates can be resolved explicitly without silent deletion of unrelated entries.
- Cover the actual Dictionary mutation route, reusing CorrectionRule logic. Existing CorrectionRuleChecks alone leave addReplacement unprotected.
- Native-test synthetic add/update/duplicate recovery using an isolated disposable library, then verify no fixture remains in the user's data.
- Record signed installed acceptance; the isolated algorithm run is not a native transcription test.
Coordination
Second-pass request under #164. #134 owns discovery/navigation and #15 first dictation; neither covers contradictory saved rules. Share the AppModel implementation owner with Read/recovery changes.
- Ngôn ngữ chính
- Swift
- Star
- 0
- Fork
- 1
- Merge trung bình
- 8 giờ 5 phút
- Pull request đã merge (30 ngày)
- 215
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Ship-Work/workbench
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue help wanted
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 74/100
Ship-Work/workbench#29 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Ship-Work/workbench
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
storage: remove unused BucketName wrapper aliasesCó thể đã có người làm @chingor13 đã nhận hôm nay. Đang mởapi: storage type: cleanup
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
googleapis/google-cloud-swift#1509 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
📦 expo-updates contributor: external iOS needs review sdk-57 sdk-58 severity: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
expo/expo#52004 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
marcovisona/arca#5 ·
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
luis-guillen/airy#2 ·