Compare commits

..

1 Commits

Author SHA1 Message Date
Cursor Agent
55ebc86b55 Fix intermittent win32com CLSIDToPackageMap errors on Windows.
Some checks failed
Mirror to Gitea / mirror (push) Has been cancelled
Corrupt gen_py early-binding cache is cleared and EnsureDispatch retried
(with late-bound Dispatch fallback), matching the manual Temp\gen_py workaround.

Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
2026-09-22 20:05:45 +00:00
2 changed files with 45 additions and 56 deletions

View File

@@ -394,53 +394,51 @@
</div> </div>
<p class="subtitle">Create a new QC datasheet from the latest matching workbook.</p> <p class="subtitle">Create a new QC datasheet from the latest matching workbook.</p>
<form id="create-form"> <div class="fields">
<div class="fields"> <label class="field combobox" for="set-dropdown-input">
<label class="field combobox" for="set-dropdown-input"> <span id="set-label" class="field-label">Select Set</span>
<span id="set-label" class="field-label">Select Set</span> <input
<input id="set-dropdown-input"
id="set-dropdown-input" class="combobox-input"
class="combobox-input" type="text"
type="text" autocomplete="off"
autocomplete="off" spellcheck="false"
spellcheck="false" role="combobox"
role="combobox" aria-expanded="false"
aria-expanded="false" aria-controls="set-dropdown-panel"
aria-controls="set-dropdown-panel" aria-autocomplete="list"
aria-autocomplete="list" aria-labelledby="set-label"
aria-labelledby="set-label" placeholder=" ">
placeholder=" "> <select id="set-dropdown" aria-labelledby="set-label" tabindex="-1"></select>
<select id="set-dropdown" aria-labelledby="set-label" tabindex="-1"></select> <span class="combobox-caret" aria-hidden="true">&#9662;</span>
<span class="combobox-caret" aria-hidden="true">&#9662;</span> <div id="set-dropdown-panel" class="combobox-panel" role="listbox" aria-labelledby="set-label" hidden></div>
<div id="set-dropdown-panel" class="combobox-panel" role="listbox" aria-labelledby="set-label" hidden></div> </label>
</label> <label class="field combobox" for="ink-dropdown-input">
<label class="field combobox" for="ink-dropdown-input"> <span id="ink-label" class="field-label">Select Ink Color</span>
<span id="ink-label" class="field-label">Select Ink Color</span> <input
<input id="ink-dropdown-input"
id="ink-dropdown-input" class="combobox-input"
class="combobox-input" type="text"
type="text" autocomplete="off"
autocomplete="off" spellcheck="false"
spellcheck="false" role="combobox"
role="combobox" aria-expanded="false"
aria-expanded="false" aria-controls="ink-dropdown-panel"
aria-controls="ink-dropdown-panel" aria-autocomplete="list"
aria-autocomplete="list" aria-labelledby="ink-label"
aria-labelledby="ink-label" placeholder=" ">
placeholder=" "> <select id="ink-dropdown" aria-labelledby="ink-label" tabindex="-1"></select>
<select id="ink-dropdown" aria-labelledby="ink-label" tabindex="-1"></select> <span class="combobox-caret" aria-hidden="true">&#9662;</span>
<span class="combobox-caret" aria-hidden="true">&#9662;</span> <div id="ink-dropdown-panel" class="combobox-panel" role="listbox" aria-labelledby="ink-label" hidden></div>
<div id="ink-dropdown-panel" class="combobox-panel" role="listbox" aria-labelledby="ink-label" hidden></div> </label>
</label> <label class="field" for="serial-input">
<label class="field" for="serial-input"> <span id="serial-label" class="field-label">Serial:</span>
<span id="serial-label" class="field-label">Serial:</span> <input id="serial-input" type="text" placeholder="e.g. 1234/A" aria-labelledby="serial-label">
<input id="serial-input" type="text" placeholder="e.g. 1234/A" aria-labelledby="serial-label"> </label>
</label> </div>
</div>
<div class="divider"></div> <div class="divider"></div>
<button id="create-button" type="submit">Create datasheet</button> <button id="create-button" type="button">Create datasheet</button>
</form>
<div id="status" class="status status-ready" role="status">Loading configuration...</div> <div id="status" class="status status-ready" role="status">Loading configuration...</div>
<p id="version" class="version"></p> <p id="version" class="version"></p>
</section> </section>
@@ -454,7 +452,6 @@
const setPanel = document.getElementById("set-dropdown-panel"); const setPanel = document.getElementById("set-dropdown-panel");
const inkPanel = document.getElementById("ink-dropdown-panel"); const inkPanel = document.getElementById("ink-dropdown-panel");
const serialInput = document.getElementById("serial-input"); const serialInput = document.getElementById("serial-input");
const createForm = document.getElementById("create-form");
const createBtn = document.getElementById("create-button"); const createBtn = document.getElementById("create-button");
const status = document.getElementById("status"); const status = document.getElementById("status");
const themeToggle = document.getElementById("theme-toggle"); const themeToggle = document.getElementById("theme-toggle");
@@ -741,7 +738,7 @@
} }
}); });
async function createDatasheet() { createBtn.addEventListener("click", async () => {
createBtn.disabled = true; createBtn.disabled = true;
try { try {
const result = await window.pywebview.api.create( const result = await window.pywebview.api.create(
@@ -753,11 +750,6 @@
} finally { } finally {
createBtn.disabled = false; createBtn.disabled = false;
} }
}
createForm.addEventListener("submit", async (event) => {
event.preventDefault();
await createDatasheet();
}); });
window.addEventListener("pywebviewready", initialize); window.addEventListener("pywebviewready", initialize);

View File

@@ -21,8 +21,6 @@ def test_ui_asset_exists_and_has_required_bridge_content():
'id="set-label"', 'id="set-label"',
'id="ink-label"', 'id="ink-label"',
'id="serial-label"', 'id="serial-label"',
'id="create-form"',
'id="create-button" type="submit"',
"Create datasheet", "Create datasheet",
"status-ready", "status-ready",
"status-success", "status-success",
@@ -33,7 +31,6 @@ def test_ui_asset_exists_and_has_required_bridge_content():
"get_initial_data()", "get_initial_data()",
"get_inks(setDropdown.value)", "get_inks(setDropdown.value)",
"api.create(", "api.create(",
'createForm.addEventListener("submit"',
"finally", "finally",
'inputEl.value = selectEl.value || ""', 'inputEl.value = selectEl.value || ""',
'inputEl.addEventListener("mousedown", () => {\n open();\n });', 'inputEl.addEventListener("mousedown", () => {\n open();\n });',