sync: dev to extern-contrib - #1014
Conversation
fix: handle PID 0 submission rows
Reviewer's guide (collapsed on small PRs)Reviewer's GuideBumps the script/package version to 3.6.2 and hardens the DOM manipulation logic for reset/resubmit links in the submissions table to handle cases where a resubmit link is missing, while also adding an Update.json entry. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Deploying xmoj-script-dev-channel with
|
| Latest commit: |
18acd49
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5e65362f.xmoj-script-dev-channel.pages.dev |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
Fixed security issues:
-
Cross-site scripting (XSS) via untrusted HTML/JS injection in web rendering sinks (link)
-
The logic still relies heavily on
childNodes[n]indexing, which is brittle to DOM structure changes; consider selecting the needed cells/links via more explicit selectors (e.g.,querySelectororchildrenwith clear indices) to make the code more robust and self-documenting. -
When checking for the presence of
resubmitLink, using early returns or small helper functions (e.g.,createSourceCellWithLinks) could simplifymain()and make this block easier to read and reuse.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The logic still relies heavily on `childNodes[n]` indexing, which is brittle to DOM structure changes; consider selecting the needed cells/links via more explicit selectors (e.g., `querySelector` or `children` with clear indices) to make the code more robust and self-documenting.
- When checking for the presence of `resubmitLink`, using early returns or small helper functions (e.g., `createSourceCellWithLinks`) could simplify `main()` and make this block easier to read and reuse.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
sync-branches: New code has just landed in dev, so let's bring extern-contrib up to speed!
Summary by Sourcery
Improve submission data transfer and rendering while adding support for efficient numeric inputs.
New Features:
Bug Fixes:
Enhancements:
Chores:
Summary by cubic
Fixes results-table rendering by only showing the “重交” link when it exists and adds a faster, more robust ApplyData pipeline. Old: always injected the resubmit link and encoded payloads via thrown errors; New: safe DOM-built links, gzip+Base93 by default with optional NSC3 number-stream mode and UI controls, payload emitted to stderr with abort-triggered RE, and ApplyData controls render even without the server container. Bumps version to 3.6.3 and updates the feed.
#apply_datais missing (attached near results) and only binds the toggle listener when the element exists.package.jsonat 3.6.3;Update.jsonincludes 3.6.2 and 3.6.3 prerelease entries and notes.Written for commit 18acd49. Summary will update on new commits.