Repository navigation
Conversation
- adopt OINK 1.1 sidebar and search extension APIs - reconcile print overrides and inherit upstream translations - add reviewed upgrade tooling and compatibility checks - refresh maintenance docs and regression coverage
- configure verified English and Chinese source groups - document consent, staging checks and rollout blockers - accept blank module checksum lines without relaxing checks - consolidate module lock regression coverage
- allow superseded runs to cancel gates and reports - combine assembly and browser checks on one runner - preserve required checks and publication permissions - test failure gates and document queue behavior
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
Upgrades the site’s OINK theme dependency to v1.1.0 and refactors HugeGraph customizations to rely on OINK’s public extension APIs, while adding an explicit, review-gated upgrade workflow and strengthening regression coverage.
Changes:
- Update OINK module pin (go.mod/go.sum) and adopt the new sidebar/search-tail public APIs in site JavaScript.
- Add an “OINK upgrade SOP” +
update-oinkcommand that fingerprints reviewed upstream files and runs full validation gates. - Refresh and expand UI/E2E tests and CI workflow structure to match the new sidebar/search behavior and the upgraded print contract.
| File | Description |
|---|---|
| tests/ui-ai/ui-contract.test.cjs | Updates contract assertions to ensure OINK public APIs are used (no legacy patches). |
| tests/ui-ai/sidebar-persistence.test.cjs | Adds focused unit coverage for sidebar state persistence via OinkSidebar API. |
| tests/ui-ai/kapa-adapter.test.cjs | Updates adapter tests for native search-tail registration + cancellation/focus behavior. |
| tests/e2e/workflow-contract.test.cjs | Updates workflow contract expectations and adds new checks around cancellation/gating. |
| tests/e2e/visual.spec.js | Stabilizes screenshots (fonts ready + animations disabled) and updates collapsed sidebar assertion. |
| tests/e2e/theme-upgrade.spec.js | Adds upgrade regression coverage: print output correctness, no-JS nav, blocked storage behavior. |
| tests/e2e/search-ranking.spec.js | Splits ranking cases into individual tests for clearer budgets and failures. |
| tests/e2e/platform.spec.js | Aligns platform checks with OINK 1.1 sidebar/drawer inert/focus behaviors. |
| tests/e2e/package.json | Runs new theme-upgrade spec in CI browser suite. |
| tests/e2e/ai.spec.js | Switches AI-row selection to native option rows; adds keyboard/IME/cancellation coverage. |
| scripts/versioning.py | Switches to download_locked() for theme module resolution and integrity checks. |
| scripts/update_oink.py | New review-gated upgrade command that fingerprints upstream surfaces and runs full validation gates. |
| scripts/update-oink.sh | Shim wrapper to run the Python upgrade tool consistently. |
| scripts/test_oink_upgrade.py | Unit tests for upgrade preflight/review gating and baseline update behavior. |
| scripts/test_oink_module.py | Unit tests for strict module lock verification (no replace/exclude, checksum match, minimal graph). |
| scripts/test_download_data.py | Adjusts i18n expectations and adds rendered-output verification for inherited theme labels. |
| scripts/oink_module.py | New helper to strictly resolve/download/verify the pinned OINK module from go.mod/go.sum. |
| scripts/oink-upgrade.md | Adds SOP documentation for upgrade/review/rollback and maps customizations to regression evidence. |
| scripts/oink-overrides.json | Adds reviewed baseline fingerprints for upstream files relevant to overrides/extensions. |
| scripts/kapa-rollout.md | Adds rollout runbook for staged Kapa enablement, consent/CSP validation, and evidence requirements. |
| layouts/_partials/shell/toc.html | Updates comment/version annotation for the reviewed upstream base. |
| layouts/_partials/shell/sidebar-panel.html | Updates override header to reflect review against OINK v1.1.0. |
| layouts/_partials/shell/config.html | Updates override header to reflect review against OINK v1.1.0. |
| layouts/_partials/print/page-content.html | Updates print partial to return plain/book dict per OINK 1.1 contract and avoid parallel render races. |
| layouts/_partials/navbar.html | Removes sidebar restore button markup now handled by OINK shell behavior. |
| layouts/_partials/navbar-item.html | Updates override header to reflect review against OINK v1.1.0. |
| layouts/_partials/hooks/body-end.html | Removes labels no longer needed due to native theme search-tail rendering. |
| i18n/zh-CN.yaml | Reduces to HugeGraph-specific labels; relies on OINK for generic zh-CN UI strings. |
| i18n/en.yaml | Removes now-inherited UI strings (e.g., assets download row label). |
| hugo.yaml | Records verified Kapa source-group IDs while keeping production AI disabled. |
| go.mod | Pins OINK to v1.1.0. |
| go.sum | Updates checksums for OINK v1.1.0 pin. |
| contribution.md | Updates contributor guidance for module verification and adds CI queue/rerun notes. |
| assets/scss/_styles_project.scss | Removes CSS for now-native sidebar restore and ask-ai search-tail row. |
| assets/js/kapa-adapter.js | Refactors AI integration to register native search-tail extension; adds cancellation/focus/settlement handling. |
| assets/js/hugegraph-shell.js | Refactors sidebar persistence to use OinkSidebar public API; removes sidebar inert/overlay patching. |
| README.md | Updates module verification instructions and documents the upgrade command. |
| NOTICE | Removes hard-coded OINK version reference. |
| AGENTS.md | Replaces outdated assistant guidance with current entry points, constraints, and validation expectations. |
| .github/workflows/hugo.yml | Updates module verification step, merges assembly + browser checks onto one runner, improves cancellation behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- incorporate the reviewed master prerequisite - retain baseline verification and its module lock checks - preserve the already validated candidate file tree
- handle single-match artifact download layout - retain metadata identity and source SHA validation - reject flat inputs for multi-version assembly - cover staging layout and invalid metadata
- use the declared artifact version selection - keep historical print checks for full builds - validate latest-only browser checks locally
bitflicker64
left a comment
There was a problem hiding this comment.
Blocking: no. Summary: The OINK 1.1 migration uses the tagged sidebar and search-tail APIs as documented, the Print override matches the upstream plain/book contract, and the flattened-artifact fallback is limited to a single selected version. Two minor issues are in the new upgrade tooling: the CI baseline check reports any local override addition as an upstream change without naming the file, and the upgrade command leaves the previous version's checksums in go.sum. Evidence: diff a5a9861..67e73b5; go mod download -json github.com/pgsty/oink@v1.1.0 returns the go.sum hash; OINK v1.1.0 sidebar-state.js and command-palette.js read for the API contracts; update_oink.py --check-baseline passes at head and fails after copying upstream layouts/_partials/breadcrumb.html unchanged into the site; go get github.com/pgsty/oink@v1.0.0 on a copy of go.mod/go.sum leaves four go.sum lines; node --test tests/ui-ai/*.test.cjs (35 pass), test_oink_upgrade and the two changed test_versioning cases pass; the Build and deploy site run on this head is green.
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 1
Open (6)
activate()can returnundefinedwhen invoked whilestateis'loading'/'consent'. With the… · New Switching fromif: always()toif: ${{ !cancelled() }}means these upload steps will be skipped… · New Switching fromif: always()toif: ${{ !cancelled() }}means these upload steps will be skipped… · New The previous implementation suppressed the Ask AI tail for empty queries and command-prefixed… · New The new failure message drops the actionable context that existed before (which GO_BIN value was… When activation is invoked via the OINK command-palette search-tail extension, callers mayawait…
imbajin
left a comment
There was a problem hiding this comment.
Blocking: no. Summary: The review found a gap in the new OINK override inventory and an unsettled activation path if opening Kapa throws. Evidence: Exact-head static review of scripts/update_oink.py and assets/js/kapa-adapter.js; the latest Build and deploy site workflow succeeded.
bitflicker64
left a comment
There was a problem hiding this comment.
Blocking: yes. Summary: The last commit (014e012, "docs(goal): temporary handoff ...") force-adds 16 files under .goal-task/, a path that .gitignore excludes. They include about 19 MB of generated PNGs and an agent handoff note. That note says the directory must be removed from the branch before merge. The OINK 1.1 migration itself raised no new finding. Evidence: git ls-tree -r -l 014e0121 .goal-task totals 19,075,787 bytes, 11 of them PNG files of 1.4 to 2.3 MB each. .gitignore:37 is /.goal-task. At this head in a temporary worktree, python3 scripts/update_oink.py --check-baseline reported that the baseline matches. python3 -m unittest test_oink_upgrade passed 7 of 7, node --test ../ui-ai/*.test.cjs passed 35 of 35, and node --test workflow-contract.test.cjs passed 6 of 6. All CI jobs at this head succeeded.
imbajin
left a comment
There was a problem hiding this comment.
Blocking: no. Summary: The search-tail action can submit stale text after edits, and the TOC disclosure state no longer persists. Evidence: Static inspection of the pinned OINK v1.1.0 command-palette and sidebar APIs plus the changed adapter and selector.
- settle Kapa failures and activate the current search query - migrate sidebar preferences while preserving aside defaults - improve locked module diagnostics and resumable checksum cleanup - cover data overrides and retain workflow module graph checks
- replace the widget placeholder with the existing site logo - keep the logo request on the current site origin - cover the explicit widget logo attribute
- raise the widget modal above the site launcher layer - prevent the mobile launcher from covering the query input - verify the supported modal layer configuration
- describe scoped HTML crawling and language groups - preserve old uploads in Legacy for recovery - distinguish staging citations and content provenance
- enable Kapa with the staging-tested CSP hosts - preserve consent gating and ASF default policy - verify disabled rollback fixtures in CI and upgrades - document pending production citation checks
- align rollout instructions with enabled defaults - document enabled and disabled browser coverage - include the rollback fixture port in upgrade setup - remove the obsolete search test phase label
- use official English and Chinese documentation origins - verify content parity before changing crawl sources - keep current indexing evidence in the rollout issue


Summary
Upgrade OINK 1.0 to 1.1 and keep HugeGraph customizations on the theme's sidebar and search-tail APIs. The theme owns rendering and keyboard interactions; HugeGraph retains version/locale preferences, consent-gated Ask AI and cancellation/focus handling.
All review threads on #496 and the four follow-ups from #497's review have been checked and answered; valid findings are fixed, and non-applicable suggestions include source evidence.
Validation and rollout
Current-head CI passes at
dc982f312, including the documentation/test-message cleanup.32acb50196503f74f74da017721d14a2ca3b63f3after a successful AI-off rollback. Actual desktop/mobile EN/CN answers, group filtering, consent/failure/retry, historical notices and the HugeGraph icon have staging evidence in [Feature] Enable Ask AI with Kapa: Source Groups, ASF CSP, and Privacy Compliance #495.Maintenance: OINK upgrade SOP · Kapa rollout.
Before / after
Chinese desktop (dark)
Chinese mobile drawer (dark)