Skip to content

feat(tree): show best placement LWR and a saved threshold - #63

Open
hyperpolymath wants to merge 1 commit into
JoshuaJewell:mainfrom
hyperpolymath:upstream/placement-evidence
Open

hyperpolymath wants to merge 1 commit into
JoshuaJewell:mainfrom
hyperpolymath:upstream/placement-evidence

Conversation

@hyperpolymath

@hyperpolymath hyperpolymath commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Change and reason

The viewer currently falls back to LWR = 1 when a placement has no like_weight_ratio. This change computes each query's best reported LWR from the opened raw placement.jplace, shows it in the existing query list, keeps absent or invalid weights as Missing (never 1) throughout the viewer, and adds a best-LWR threshold saved with the view settings (default 0.95); values below it are labelled in the list. When a query's candidate weights are incomplete, no best location is assumed and no LWR-weighted count is drawn. The viewer points at the raw placement file for raw LWRs, since accumulation changes the weights.

Frontend only: seven files under frontend/src. View IDs, saved-view documents and source files are unchanged; older saved views get the default threshold.

This is the first judgement from the discussion in #27 (placement confidence, your answer to question 6). #27 stays open for the rest of that design; nothing from the sidecar proposal is in here.

Validation

bun 1.3.10, in frontend/:

bun test src            # 46 pass, 0 fail (7 files)
bun run tsc --noEmit
bun run build

Re-run on a second machine with bun 1.4.3 and node 26.12.0: same result. The new tests (tree/placementLwr.test.ts) cover absent and invalid weights, partial candidate weights, zero, field order, ties, display counts, view changes and the saved threshold's defaults and clamping.

Not run locally: Julia and R, since no Julia or R file changes. CI (Julia tests, Agda proofs, codecov patch) is green on this commit.

Scope

Left out, as asked in review: the .sources and .evidence sidecars, the import attestation and pairing flow, the recompute-on-read checker, the phylogeny.jl publishing changes and the verdict wording. No lockfile change.

Contribution checks

  • I followed CONTRIBUTING.md.
  • This branch starts at current upstream main (78ffc2f, behind_by: 0) and contains no merges from fork main.
  • Every commit is signed and shows as Verified (one commit).
  • CI has run and passes.
  • Existing licensing, citation and acknowledgement text is unchanged.

@codecov

codecov Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@hyperpolymath
hyperpolymath marked this pull request as ready for review October 18, 2026 20:57
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-18T20:58:01.136244Z d8704c9 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@JoshuaJewell

Copy link
Copy Markdown
Owner

Thanks, the core is useful, but this is much more than I want to maintain. I’d take a cut-down version: compute each query’s best raw LWR from the raw placement.jplace (shown as missing where LWR is absent, never as 1), show it in the existing viewer, and add a threshold setting. Please drop the .sources and .evidence sidecars, the import attestation and pairing flow, the recompute-on-read checker, the changes to phylogeny.jl publishing, and the verdict wording. Please also match the repository’s code style. Keep it as one signed commit on current main.

…hreshold

Compute the best reported weight in the existing query list, retain absent/invalid weights as missing throughout the viewer, and save a threshold with view settings. Avoid assigning a best location or weighted counts when candidate weights are incomplete.

Frontend-only reduction requested on upstream #63. bun 1.3.10: 46 tests, TypeScript and production build passed.
@hyperpolymath
hyperpolymath force-pushed the upstream/placement-evidence branch from d8704c9 to 3d8688a Compare October 19, 2026 08:09
@hyperpolymath hyperpolymath changed the title feat(tree): show raw placement LWR evidence with recorded accumulated mappings feat(tree): show best placement LWR and a saved threshold Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

Cut down as requested. This is now seven frontend files: best reported LWR in the existing query list, explicit missing values, and a saved threshold. The sidecars, pairing/import flow, publishing changes, checker and verdict wording are gone.

I replaced the branch with one Verified commit on current main (78ffc2f). All 46 frontend tests, TypeScript checking and the production build pass locally; full CI is running again.

@JoshuaJewell

Copy link
Copy Markdown
Owner

This is good. Please rebase onto main (ce2c645) and re-sign, then I’ll merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants