[PR #6214] [MERGED] test(tgbot): detect open-coded keypad transitions #6176

Closed
opened 2026-11-02 04:06:55 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/6214
Author: @n0ctal
Created: 8/14/2026
Status: ✅ Merged
Merged: 8/15/2026
Merged by: @MHSanaei

Base: main ← Head: upstream-tgbot-keypad-followup


📝 Commits (2)

  • abbe02e test(tgbot): detect open-coded keypad transitions
  • f074368 Merge branch 'main' into upstream-tgbot-keypad-followup

📊 Changes

2 files changed (+49 additions, -7 deletions)

View changed files

📝 internal/web/service/tgbot/numeric_input.go (+2 -3)
📝 internal/web/service/tgbot/numeric_input_test.go (+47 -4)

📄 Description

Summary

  • enforce the two-line comment limit for the numeric-input helper
  • scan all production tgbot Go files for open-coded keypad state switches

Why

This follows up on review comments for #6211 that did not land before merge. The original fixed-file count could stay green when a future call site reintroduced the duplicated transition elsewhere.

Scope

Tests and one comment only. Runtime behavior is unchanged.

Validation

  • go test ./internal/web/service/tgbot/...
  • golangci-lint run ./internal/web/service/tgbot/...
  • mutation fails with open-coded numeric keypad transition at tgbot_router.go:442:9; use updateNumericInput
  • make gen-check

Risk

Low. The AST check ignores tests and the helper itself; equivalent non-switch control flow remains outside its scope.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/6214 **Author:** [@n0ctal](https://github.com/n0ctal) **Created:** 8/14/2026 **Status:** ✅ Merged **Merged:** 8/15/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `upstream-tgbot-keypad-followup` --- ### 📝 Commits (2) - [`abbe02e`](https://github.com/MHSanaei/3x-ui/commit/abbe02ea5d87e261c275dfffe33a4a0bde45d701) test(tgbot): detect open-coded keypad transitions - [`f074368`](https://github.com/MHSanaei/3x-ui/commit/f0743687cb9628c9918c402e63fd71833bf72141) Merge branch 'main' into upstream-tgbot-keypad-followup ### 📊 Changes **2 files changed** (+49 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `internal/web/service/tgbot/numeric_input.go` (+2 -3) 📝 `internal/web/service/tgbot/numeric_input_test.go` (+47 -4) </details> ### 📄 Description ## Summary - enforce the two-line comment limit for the numeric-input helper - scan all production tgbot Go files for open-coded keypad state switches ## Why This follows up on review comments for #6211 that did not land before merge. The original fixed-file count could stay green when a future call site reintroduced the duplicated transition elsewhere. ## Scope Tests and one comment only. Runtime behavior is unchanged. ## Validation - `go test ./internal/web/service/tgbot/...` - `golangci-lint run ./internal/web/service/tgbot/...` - mutation fails with `open-coded numeric keypad transition at tgbot_router.go:442:9; use updateNumericInput` - `make gen-check` ## Risk Low. The AST check ignores tests and the helper itself; equivalent non-switch control flow remains outside its scope. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:06:55 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#6176
No description provided.