web: read the attach menu's hidden state as a boolean (TypeScript 6) #367

Merged
kompas-review merged 1 commit from khyretos/ts6-attach-menu-hidden into main 2026-11-12 23:06:10 +01:00
Owner

Requested by Kees · project thread

The TypeScript 6 update (#366) fails the web typecheck on one line: menuOpen(attachMenu.hidden) in web/src/main.ts. In the newer DOM types hidden is boolean | 'until-found', and the toggle takes a boolean.

attachMenu.hidden !== false keeps the behaviour (anything hidden opens the menu) and compiles with TypeScript 5 and 6.

🤖 Generated with Claude Code

<!-- claude-projects-attribution: {"github_login":"Khyretos"} --> _Requested by **Kees** · [project thread](https://claude.ai/code/project/chan_011BtPMgCJ5X6Zf2Ef9ZHhH1?thread=cmsg_011BtPMgCJ5X6Zf2Ef9ZHhH1AVatLn1eAd2YNNAUHThkRZ)_ The TypeScript 6 update (#366) fails the web typecheck on one line: `menuOpen(attachMenu.hidden)` in `web/src/main.ts`. In the newer DOM types `hidden` is `boolean | 'until-found'`, and the toggle takes a boolean. `attachMenu.hidden !== false` keeps the behaviour (anything hidden opens the menu) and compiles with TypeScript 5 and 6. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
web: read the attach menu's hidden state as a boolean (TypeScript 6)
All checks were successful
kreative-pr/review reviewed: 0 finding(s)
build / web (pull_request) Successful in 12s
build / skills (pull_request) Successful in 14s
build / runner-windows (pull_request) Successful in 16s
build / runner (pull_request) Successful in 18s
fresh-install / fresh-install (pull_request) Successful in 29s
review-gate / sweep (pull_request) Successful in 7s
lint / megalinter (pull_request) Successful in 1m12s
build / web-live (pull_request) Successful in 6m1s
review-gate / gate review findings are all handled
build / server (pull_request) Successful in 7m34s
kk / all-checks All 10 checks passed
ecdeddd33a
The newer DOM types make hidden a boolean or 'until-found', which the
menu toggle's boolean parameter refuses; this is the one error that
fails the web typecheck in the TypeScript 6 update (#366).

Co-Authored-By: Claude <noreply@anthropic.com>
Collaborator

Title

web: read the attach menu's hidden state as a boolean (TypeScript 6)


PR Type

Bug fix


Description

  • Fix TypeScript 6 type error in attach menu toggle

  • Convert hidden state to boolean for menuOpen call

  • Preserve existing behavior when menu is hidden


Diagram Walkthrough

flowchart LR
  A["TypeScript 6 Update"] -->|"causes error"| B["hidden type mismatch"]
  B -->|"fix applied"| C["boolean conversion"]
  C -->|"restores"| D["menu toggle behavior"]

File Walkthrough

Relevant files
Bug fix
main.ts
Convert hidden state to boolean for TypeScript 6 compatibility

web/src/main.ts

  • Changed attachMenu.hidden to attachMenu.hidden !== false in event
    listener
  • Resolves TypeScript 6 type incompatibility with DOM types
  • Maintains original logic where any hidden state opens the menu
  • No functional behavior change, only type safety improvement
+1/-1     

## Title <!-- pr-agent:describe:persistent --> web: read the attach menu's hidden state as a boolean (TypeScript 6) ___ ### **PR Type** Bug fix ___ ### **Description** - Fix TypeScript 6 type error in attach menu toggle - Convert hidden state to boolean for menuOpen call - Preserve existing behavior when menu is hidden ___ ### Diagram Walkthrough ```mermaid flowchart LR A["TypeScript 6 Update"] -->|"causes error"| B["hidden type mismatch"] B -->|"fix applied"| C["boolean conversion"] C -->|"restores"| D["menu toggle behavior"] ``` <details> <summary><h3> File Walkthrough</h3></summary> <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Bug fix</strong></td><td><table> <tr> <td> <details> <summary><strong>main.ts</strong><dd><code>Convert hidden state to boolean for TypeScript 6 compatibility</code></dd></summary> <hr> web/src/main.ts <ul><li>Changed <code>attachMenu.hidden</code> to <code>attachMenu.hidden !== false</code> in event <br>listener<br> <li> Resolves TypeScript 6 type incompatibility with DOM types<br> <li> Maintains original logic where any hidden state opens the menu<br> <li> No functional behavior change, only type safety improvement</ul> </details> </td> <td><a href="https://git.kreative-kompas.com/khyretos/kreative-kompanion/src/branch/khyretos/ts6-attach-menu-hidden/web/src/main.ts">+1/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></td></tr></tr></tbody></table> </details> ___
Collaborator

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🧪 No relevant tests
🔒 No security concerns identified
⚡ No major issues detected
## PR Reviewer Guide 🔍 <!-- pr-agent:review:full --> Here are some key observations to aid the review process: <table> <tr><td>🧪&nbsp;<strong>No relevant tests</strong></td></tr> <tr><td>🔒&nbsp;<strong>No security concerns identified</strong></td></tr> <tr><td>⚡&nbsp;<strong>No major issues detected</strong></td></tr> </table>

🧹 Lint report · ✅ all 25 checks clean

Errors below fail this check.

✅ Clean: black, checkstyle, djlint, editorconfig-checker, git_diff, gitleaks, grype, hadolint, htmlhint, isort, jsonlint, markdownlint, npm-groovy-lint, pmd, prettier, prettier, ruff, secretlint, shellcheck, shfmt, stylelint, trivy, trufflehog, xmllint, yamllint

MegaLinter on soucouyant · full logs in the Actions run · comment /improve for AI fix suggestions

<!-- kk-lint --> ## 🧹 Lint report · ✅ all 25 checks clean Errors below fail this check. ✅ Clean: black, checkstyle, djlint, editorconfig-checker, git_diff, gitleaks, grype, hadolint, htmlhint, isort, jsonlint, markdownlint, npm-groovy-lint, pmd, prettier, prettier, ruff, secretlint, shellcheck, shfmt, stylelint, trivy, trufflehog, xmllint, yamllint <sub>MegaLinter on soucouyant · full logs in the Actions run · comment <code>/improve</code> for AI fix suggestions</sub>
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
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
khyretos/kreative-kompanion!367
No description provided.