imbajin commented on code in PR #496:
URL: https://github.com/apache/hugegraph-doc/pull/496#discussion_r4096190759
##########
assets/js/kapa-adapter.js:
##########
@@ -244,23 +256,49 @@
renderState('idle', '');
if (consent && consent.open) consent.close();
restoreFocus();
+ settle();
}
- function activate(query, submit, trigger) {
+ function activate(query, submit, trigger, context) {
if (state === 'loading' || state === 'consent') return;
+ if (context && context.signal.aborted) return Promise.resolve();
Review Comment:
Checked against pinned OINK v1.1.0: the palette wraps the return in
`Promise.resolve(operation)` and prevents another activation while `pendingKey`
is set. The busy-state no-op therefore does not violate its contract. Keeping
the existing behavior. Evidence:
https://github.com/pgsty/oink/blob/v1.1.0/assets/js/command-palette.js#L630-L663
##########
assets/js/kapa-adapter.js:
##########
@@ -244,23 +256,49 @@
renderState('idle', '');
if (consent && consent.open) consent.close();
restoreFocus();
+ settle();
}
- function activate(query, submit, trigger) {
+ function activate(query, submit, trigger, context) {
if (state === 'loading' || state === 'consent') return;
+ if (context && context.signal.aborted) return Promise.resolve();
lastTrigger = trigger || documentObject.activeElement;
+ var completion;
Review Comment:
Same verified contract as the earlier comment: OINK v1.1.0 prevents
concurrent activation and accepts a void result through
`Promise.resolve(operation)`. No adapter change is needed for this path.
https://github.com/pgsty/oink/blob/v1.1.0/assets/js/command-palette.js#L630-L663
##########
.github/workflows/hugo.yml:
##########
@@ -358,12 +346,12 @@ jobs:
- name: Run blocking Chromium contracts
working-directory: tests/e2e
env:
- SITE_ROOT: ${{ github.workspace }}/public-site
+ SITE_ROOT: ${{ runner.temp }}/public-site
AI_SITE_ROOT: ${{ runner.temp }}/ai-site
EXPECTED_VERSIONS: ${{ needs.prepare.outputs.selection }}
run: npm run test:ci
- name: Upload E2E report
- if: always()
+ if: ${{ !cancelled() }}
Review Comment:
`cancelled()` is itself a status-check function, so GitHub does not add the
implicit `success()` condition. `!cancelled()` therefore uploads on both
success and failure, while allowing cancellation; `always()` is unnecessary.
Keeping the current condition.
https://docs.github.com/en/actions/reference/workflows-and-actions/expressions#status-check-functions
##########
.github/workflows/hugo.yml:
##########
@@ -402,7 +390,7 @@ jobs:
npx playwright install --with-deps chromium
npm run test:visual
- name: Upload advisory visual evidence
- if: always()
+ if: ${{ !cancelled() }}
Review Comment:
The same status-check rule applies to the visual report: `!cancelled()`
overrides implicit `success()` and remains true after a failed step. No change
needed.
https://docs.github.com/en/actions/reference/workflows-and-actions/expressions#status-check-functions
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]