Repository navigation
feat: send trade phrases by themselves, give quick phrases their own page, and edit the online library - #46
Merged
Merged
Conversation
Two switches in Comebacks › Champ-select phrases, both off by default: send the first phrase when the user clicks Trade on a teammate in the client (that cell's trade turns SENT), and a thank-you template once the two champions are swapped. Each goes to a teammate once per champ select, over the client's chat API only. - comeback::trade_events follows the user's own request apart from the once-per-teammate suppression, so an ask made again after a cancel is still thanked; another teammate's trade and RECEIVED send nothing. - Every spaced post in champ select (comebacks, the phrase shortcut, the trade messages) goes through post_spaced under one chat lock, which rechecks the 3 s spacing and records it only for a post that went out; the board menu takes the lock without the spacing. - Trade messages are written when their event is seen and posted from one ordered queue that waits out the spacing instead of dropping them. - PhraseSent and PhraseSkipped name their trigger (shortcut, asked, done).
…backs The quick phrases, their shortcut and the trade's two switches move from the Comebacks page to a new Phrases page (快捷语, Ctrl+8, added last so the other pages keep their numbers). The Live page's phrase menu links there. The comebacks' two shortcuts are renamed 反击发到队伍 and 反击发到全体. The settings stay under `comeback`, where 0.0.19 saved the phrases and their shortcut, so nothing is migrated. The champ-select chat keeps one 3-second spacing for comebacks and phrases, now said on both pages.
在线语录 gets 查看和编辑: a large dialog listing either set (口吐芬芳, 火力全开) 50 lines a page, with a search, each line edited in place or removed, and new lines added on top. Every change saves both sets whole, one save after another; the core cleans them as the user's own lines (folded spaces, 200 characters, blanks and repeats within a set dropped, 5000 a set at most) and answers what it kept. The library file gains `edited` (absent in files from 0.0.19, read as false); the panel says 已修改, and removing an edited library asks first, since a new download brings back the original lines. Editing leaves the library's switch as it was. Two commands, comeback_library_lines and edit_comeback_library, both refused while nothing is downloaded.
…res and save order
Merged
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.
Summary
both off by default: 向队友发起交换时自动发送 sends the first quick phrase to the teammate the user
just asked (the cell whose trade reads
SENT), and 交换成功后自动道谢 sends a thank-you once thetwo champions have actually changed places. Each is sent at most once per teammate per champ
select; a declined, cancelled or abandoned ask is never thanked, and trades between two other
teammates (
BUSY) send nothing. The thank-you is the user's own ({seat},{champion},{name}) or the language's default (「谢谢{seat}大佬!」). Settings:comeback.trade {onAsk, onDone, thanks}(absent in 0.0.19 files, read as off). The messages queue behind champ select's shared3 s spacing with the comebacks; Activity reports
phraseSent/phraseSkippedwith the trigger.Ctrl+8). Champ select's phrases, the 发给交换的队友shortcut and the trade switches move off the Comebacks page into 选人快捷语, with panels 快捷语 and
交换英雄. The comebacks' shortcuts are renamed 反击发到队伍 / 反击发到全体. Settings stay under
comeback, so 0.0.19 files need no migration.Ctrl+1–7keep their pages.(口吐芬芳, 火力全开), 50 lines a page, a search, each line edited in place or removed, new lines
added on top. Every change saves both sets whole, one save after another (
edit_comeback_library);the core cleans them like the user's own lines (folded spaces, 200 characters, blanks and repeats
dropped, 5000 a set) and answers what it kept. An edited library shows 已修改, and removing it
asks first, since a new download brings the original lines back.
comeback-library.jsongainsedited(absent before, read as false). The library's switch is untouched by edits.DESIGN.md,AGENTS.md,docs/platform-notes.md(theSENTstate as measured).Tested
scripts/evidence.shwith the CI toolchain (RUSTUP_TOOLCHAIN=1.96.0) oncdc0e4e, every gateexit=0(target/qa/evidence/20261106T182608Z): fmt, clippy-D warnings,cargo test --workspace(lcu 12, shell 52, winer-core 345 + 1 ignored), lcu and winer-core alone,cargo xwin check, pnpm format, lint, typecheck and test (shared 7, plugin 72, desktop 169). Alsocargo xwin clippy -p winer --all-targets -D warningsonce100d3(d9d00c2andcdc0e4etouchno Windows code).
005e9ab, WeGame client, ARAM (2026-11-06 22:46 CST), both tradeswitches on, a read-only recorder of
/lol-champ-select/v1/sessionevery 0.4 s: the user askedcell 4; its trade read
SENT, every other cellINVALID. winer loggedsent a trade's message trigger=Askedthen, 5.6 s later as the champions swapped,trigger=Done. In six other champ selects that evening, with trades between other teammates(
BUSY) and bench swaps, winer sent nothing. Both recordings are replayed inthe_champ_selects_recorded_on_the_owners_pc_ask_and_thank_exactly_once.removal confirmation only for an edited library; a newer edit kept on screen while an older save
answers; a failed read (with retry) and a failed save (the kept lines shown again, nothing marked
edited). Core: cleaning and capping an edited set, a 0.0.19 library file read as unedited, edits
kept across a restart and gone with the removal, both commands refused with no library.
owner's PC ran
005e9ab, before the editor);RECEIVED,ACCEPTED,DECLINEDandCANCELLEDwere never captured.
BEGIN_COMMIT_OVERRIDE
feat: 选人时交换英雄可自动发消息:向队友发起交换时自动发出第一条快捷语,交换成功后自动道谢;两个开关默认关闭,感谢语可自定义 (#46)
feat: 选人快捷语独立成「快捷语」页(Ctrl+8),与反击页分开;反击的两个快捷键改名为「反击发到队伍」「反击发到全体」 (#46)
feat: 在线语录可以查看和编辑:分档浏览、搜索,逐句修改、删除和添加;改过的语录标「已修改」,移除前会先确认 (#46)
END_COMMIT_OVERRIDE