From 8dbb5eb2971edbdebdbf159abcfcd3f0fb409374 Mon Sep 17 00:00:00 2001 From: Rahul Agrawal <12agrawalrahul@gmail.com> Date: Thu, 6 Aug 2026 12:00:21 +0530 Subject: [PATCH 1/8] fix(build): add root package.json so bench builds the SPA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `bench build --app wikify` silently skipped the frontend: frappe's esbuild runner looks for `apps//package.json` and `continue`s when it is absent (frappe/esbuild/esbuild.js:611-620), so no bundle and no `www/wikify.html` were ever emitted on a fresh `bench get-app`. Add the root package.json with the standard Frappe SPA scripts, matching frappe/crm. `postinstall` also keeps frontend deps in sync — without it a stale `frontend/node_modules` silently builds against the wrong frappe-ui. Also ignore `wikify/public/node_modules`: `bench build` symlinks it, and git sees a symlink rather than a directory, so the existing `node_modules/` rule never matched it. Co-Authored-By: Claude Opus 5 (1M context) --- .gitignore | 3 +++ package.json | 19 +++++++++++++++++++ yarn.lock | 4 ++++ 3 files changed, 26 insertions(+) create mode 100644 package.json create mode 100644 yarn.lock diff --git a/.gitignore b/.gitignore index 5762c8b..fab1ecd 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,9 @@ venv.bak/ # Dependency directories node_modules/ jspm_packages/ +# `bench build` symlinks the app's node_modules into public/; git sees a symlink, +# not a directory, so the `node_modules/` rule above does not cover it. +wikify/public/node_modules # Frontend build output (SPA). www/wikify.html is emitted by the vite plugin. frontend/dist/ diff --git a/package.json b/package.json new file mode 100644 index 0000000..4c0c08d --- /dev/null +++ b/package.json @@ -0,0 +1,19 @@ +{ + "private": true, + "name": "wikify", + "description": "PDFs to Frappe Wiki Spaces/Documents", + "repository": { + "type": "git", + "url": "git+https://github.com/bwhtech/wikify.git" + }, + "author": "BWH", + "license": "MIT", + "bugs": { + "url": "https://github.com/bwhtech/wikify/issues" + }, + "scripts": { + "postinstall": "cd frontend && yarn install", + "dev": "cd frontend && yarn dev", + "build": "cd frontend && yarn build" + } +} diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..fb57ccd --- /dev/null +++ b/yarn.lock @@ -0,0 +1,4 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + From 3fe06407e8677d554a3ff01019bbb38e23fa7c8a Mon Sep 17 00:00:00 2001 From: Rahul Agrawal <12agrawalrahul@gmail.com> Date: Sun, 9 Aug 2026 23:44:49 +0530 Subject: [PATCH 2/8] ci: install wiki app and take pocs/scratch out of the lint gate Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/ci.yml | 2 + .pre-commit-config.yaml | 2 +- frontend/src/components/AgentChatPanel.vue | 1 - frontend/src/components/AppSettingsDialog.vue | 48 +++++++++++++++---- frontend/src/components/Explore.vue | 5 +- frontend/src/components/GraphView.vue | 13 +++-- frontend/src/components/ProjectSettings.vue | 2 +- frontend/src/components/SectionTree.vue | 3 +- frontend/src/pages/ExploreGlobal.vue | 2 +- frontend/src/pages/ImportDetail.vue | 6 +-- frontend/src/pages/ProjectDetail.vue | 4 +- frontend/src/pages/ProjectList.vue | 4 +- frontend/src/utils/mermaid.js | 11 +++-- wikify/agent/tools/read.py | 4 +- wikify/agent/tools/reparse.py | 7 ++- wikify/agent/tools/tree.py | 5 +- wikify/api/graph.py | 4 +- wikify/engine/loader/wiki.py | 4 +- wikify/engine/remediate.py | 14 ++++-- wikify/engine/store.py | 4 +- wikify/hooks.py | 3 +- wikify/jobs/generate.py | 4 +- .../v0_4/merge_duplicate_section_types.py | 4 +- wikify/tests/_cleanup.py | 4 +- wikify/tests/evals/harness.py | 14 ++++-- wikify/tests/evals/scenarios.py | 18 +++++-- wikify/tests/test_agent_write.py | 2 +- wikify/tests/test_finalize.py | 9 +++- wikify/tests/test_generate.py | 45 ++++++++++++----- wikify/tests/test_section_surgery.py | 16 +++++-- wikify/tests/test_sectionize.py | 5 +- wikify/tests/test_taxonomy.py | 4 +- 32 files changed, 181 insertions(+), 92 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ddd848f..0218a1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,9 +88,11 @@ jobs: - name: Install working-directory: /home/runner/frappe-bench run: | + bench get-app wiki --branch develop bench get-app wikify $GITHUB_WORKSPACE bench setup requirements --dev bench new-site --db-root-password root --admin-password admin test_site + bench --site test_site install-app wiki bench --site test_site install-app wikify bench build env: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 539ca12..71377e7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,4 @@ -exclude: 'node_modules|.git' +exclude: 'node_modules|\.git|^pocs/|^scratch/' default_stages: [pre-commit] fail_fast: false diff --git a/frontend/src/components/AgentChatPanel.vue b/frontend/src/components/AgentChatPanel.vue index 7eeef97..bec11dc 100644 --- a/frontend/src/components/AgentChatPanel.vue +++ b/frontend/src/components/AgentChatPanel.vue @@ -475,7 +475,6 @@ function onKeydown(e) { - diff --git a/frontend/src/components/AppSettingsDialog.vue b/frontend/src/components/AppSettingsDialog.vue index 0eed553..aed5c97 100644 --- a/frontend/src/components/AppSettingsDialog.vue +++ b/frontend/src/components/AppSettingsDialog.vue @@ -43,9 +43,21 @@ const newKey = ref(""); const MODEL_FIELDS = [ { key: "agent_model", label: "Agent model", hint: "Assistant model (projects can override)." }, - { key: "vlm_model", label: "VLM model", hint: "Vision model for re-parsing flagged / visual pages." }, - { key: "cleanup_model", label: "Cleanup model", hint: "Cheap text model for the markdown cleanup pass." }, - { key: "judge_model", label: "Judge model", hint: "Independent grader — keep distinct from the parser." }, + { + key: "vlm_model", + label: "VLM model", + hint: "Vision model for re-parsing flagged / visual pages.", + }, + { + key: "cleanup_model", + label: "Cleanup model", + hint: "Cheap text model for the markdown cleanup pass.", + }, + { + key: "judge_model", + label: "Judge model", + hint: "Independent grader — keep distinct from the parser.", + }, { key: "classifier_model", label: "Classifier model", hint: "" }, ]; @@ -108,7 +120,10 @@ const activeTab = ref(TABS[0].value); {{ tab.label }} @@ -138,14 +153,17 @@ const activeTab = ref(TABS[0].value); :placeholder="keyIsSet ? '•••• key saved — type to replace' : 'sk-or-v1-…'" />

- Used for all AI steps. Stored encrypted. Leave blank to keep the current key; - falls back to site config / the app .env when never set. + Used for all AI steps. Stored encrypted. Leave blank to keep the current + key; falls back to site config / the app .env when never set.

- +