Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[BUG]: "Delete" PAT button is gated on the input field, so a saved token can't be removed when the field is empty

Đang mở Phù hợp với người mới
#401 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 4 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
88/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, react
Lĩnh vực
authentication, frontend

Hướng nghiên cứu

Bắt đầu với logic của nút Delete trong src/pages/SettingsPage.jsx quanh dòng 205 và src/components/PATModal.jsx quanh dòng 227. Kiểm tra cách PAT đã lưu và bản nháp nhập liệu được biểu diễn, sau đó cập nhật điều kiện vô hiệu hóa để có thể xóa token đã lưu ngay cả khi ô nhập liệu trống. Xác minh ở cả hai chế độ xem rằng thao tác xóa loại bỏ token đã lưu và xóa trạng thái xác thực.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug
Bug Description

In Settings (src/pages/SettingsPage.jsx line 205) and the PAT modal
(src/components/PATModal.jsx line 227), the Delete button is disabled={!draft.trim()} —
gated on the text currently in the input, not on whether a token is actually saved (pat).

So a signed-in user (green AUTHENTICATED pill, token in localStorage) who clears the input
box can no longer revoke their stored token: Delete is disabled. The button also has no
disabled styling, so it still looks clickable but does nothing.

Verified in the running app after clearing the field:
{ inputValue:"", deleteDisabled:true, authenticatedPillShown:true, patStillInStorage:"ghp_..." }
then clicking Delete is a no-op:
{ patStillInStorage:"ghp_...", stillAuthenticated:true }

Steps to Reproduce
  1. Settings: save a PAT (the AUTHENTICATED pill appears).
  2. Select all in the token field and delete the text.
  3. The Delete button is now disabled — you can't remove the stored token without retyping.
Logs and Screenshots

After clearing the input field (token still saved):
inputValue : ""
deleteDisabled : true
authenticatedPillShown : true
patStillInStorage : "ghp_..."

After clicking Delete (no-op — button is disabled):
patStillInStorage : "ghp_..."
stillAuthenticated : true
📎 Image file:

Image
Environment Details
  • OS: macOS - Browser: Chrome
  • Repo: main @ d91d2b8
  • Files: src/pages/SettingsPage.jsx (line 205), src/components/PATModal.jsx (line 227)
  • Suggested fix: gate Delete on pat (token exists), e.g. disabled={!pat || isValidating};
    same change in PATModal.jsx. Related but closed: #321, #138, #257.
Impact

Low - Minor inconvenience

Code of Conduct
  • I have joined the Discord server and will post updates there
  • I have searched existing issues to avoid duplicates
Ngôn ngữ chính
JavaScript
Star
45
Fork
148
Merge trung bình
5 ngày 14 giờ
Pull request đã merge (30 ngày)
31

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của AOSSIE-Org/OrgExplorer

Tất cả issue của AOSSIE-Org/OrgExplorer

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.