-
Notifications
You must be signed in to change notification settings - Fork 229
fix: resolve 4 bugs in termui #3618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -138,3 +138,5 @@ export class Form extends Widget { | |
| } | ||
| } | ||
| } | ||
|
|
||
| .catch(err => console.error("Promise.all failed:", err)); | ||
|
Comment on lines
+141
to
+142
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
sed -n '75,145p' packages/ui/src/Form.ts
if rg -n '^\s*\.catch\s*\(' packages/ui/src/Form.ts; then
echo "Found a standalone catch chain."
exit 1
fi
if ! rg -n 'Promise\.all\(validationPromises\).*\.catch|try\s*\{' packages/ui/src/Form.ts; then
echo "No valid rejection-handling construct found."
exit 1
fiRepository: Karanjot786/TermUI Length of output: 3039 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== Form.ts outline =="
ast-grep outline packages/ui/src/Form.ts || true
echo "== Full Form.ts catch/block context =="
sed -n '1,180p' packages/ui/src/Form.ts
echo "== Standalone catch parse probe =="
node - <<'JS'
const source = `
class X { async m() { await 1; } }
Promise.all([1]).catch(e => console.log(e))
`;
try {
const f = new Function(source);
console.log("Node parsed source successfully");
f();
} catch (err) {
console.log("Parse/runtime error:", err.message);
}
JSRepository: Karanjot786/TermUI Length of output: 7382 Remove the orphaned This 🧰 Tools🪛 Biome (2.5.6)[error] 142-142: Expected a statement but instead found '.catch(err => console.error("Promise.all failed:", err))'. (parse) 🪛 GitHub Actions: CI / 0_build-and-test.txt[error] 142-142: 🪛 GitHub Actions: CI / build-and-test[error] 142-142: 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: Karanjot786/TermUI
Length of output: 4149
🏁 Script executed:
Repository: Karanjot786/TermUI
Length of output: 3475
Reject hexadecimal entities that exceed eight digits or the Unicode code-point limit.
entity.slice(2, 10)includes characters after the hex digits and ignores the full matched entity length. Malformed entities such as�do not passNumber.isFinite, but entities longer than eight hex digits can be decoded as truncated values, and non-surrogate values above0xFFFFbelow0x10FFFFare also valid characters.Extract the actual hex digits from the matched
entity, returnmatchwhen that sequence exceeds eight digits, parse the full sequence, and returnmatchwhen the parsed value exceeds0x10FFFF.Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents