Skip to content

Settings menu follow-ups from #188, https IRIs in the examples, search example and title link - #189

Merged
retog merged 7 commits into
nextfrom
claude/beautiful-darwin-k4c446
Oct 9, 2026
Merged

retog merged 7 commits into
nextfrom
claude/beautiful-darwin-k4c446

Conversation

@retog

@retog retog commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #188. It fixes the settings-menu problems from the review of #188 and from review on this PR, moves the SPARQL page to the https Plazi IRIs, handles https IRIs in the treatment view, and brings back two behaviours of the classic version.

Settings menu (src/components/SettingsMenu.ts)

  • A failing custom URL is no longer stored. A custom URL is stored only together with switching the page to it: when its test passes, or on Use anyway. A failing URL stays a draft in the menu, with its error, also across closing and reopening. Editing the field drops the draft, and choosing a known endpoint drops it too.
  • The custom URL has a Use button. Choosing Custom URL… only shows the field, prefilled with a stored custom URL, and does nothing else. Use (or Enter) uses the URL in the field, also when it was not edited. That is the way back from a link's server to the stored custom endpoint.
  • The menu follows the gear. On resize and scroll, at most once per frame, the menu is placed again under the gear, and it closes only when the gear leaves the view. So it stays open when the on-screen keyboard opens or closes on a phone, and it no longer ends up above the viewport.
  • No false link note with blocked site data. After storing, the endpoint is read back, so the menu no longer claims the page uses a server from its link when storage is unavailable.

Search page

  • Example name back. The search field shows Sadayoshia acamar as an example again, and searching with an empty field searches for it, as in the classic version. This was lost when the Vue app was replaced.
  • Title links to / again. While this version is served under next/, the SynoSpecies title leads back to the classic version. Once this becomes the main version, it is simply the search page. The Search tab still opens this version's search.

https IRIs

  • SPARQL page (src/advanced.ts). The treatment: and publication: prefixes, the commented-out taxon-concept and taxon-name prefixes, the DESCRIBE example and the three Tyrannosaurus rex IRIs now use https://. gg2rdf generates these namespaces with https (Mint Plazi resource IRIs with https:// as the canonical scheme plazi/gg2rdf#34). The trt: vocabulary stays http://.
  • Treatment view (SynoTreatment.ts). Treatment, taxon-concept and taxon-name IRIs are shortened in either form, through a new shortPlaziId() in utils.ts. Before, only the http:// prefix was stripped: with https IRIs the treatment ID was the whole URL, which broke the XML and RDF links built from it, and cited taxa showed their full IRIs.

Testing

  • deno check passes for advanced.ts, settings.ts, SettingsMenu.ts and SynoTreatment.ts. index.ts could not be type-checked because it imports Taxomplete from plazi.github.io, which this environment's network blocks. deno lint reports only the three existing problems. The changed TypeScript files are deno fmt-clean, apart from the embedded CSS in SynoTreatment.ts, which was already unformatted on next.
  • Playwright/Chromium against a build served under /next/, with mocked SPARQL endpoints and a stub for Taxomplete: 30 checks for the settings menu on the search, SPARQL and settings pages, at desktop size and 375px. They cover failing, passing and edited custom URLs, Use anyway, Use from a link's server without side effects, a viewport resize while typing and after the keyboard closes, the gear scrolled out of view, and blocked storage. All pass, and each fixed problem has a check that fails without its fix. 8 more checks cover the search example (Go and Enter with an empty field, a typed name) and the title link on all four pages.
  • shortPlaziId() checked on https and http treatment, taxon-concept and taxon-name IRIs, and on an unrelated URL, which it leaves unchanged.
  • Not tested against live data. This environment's network blocks the SPARQL endpoints. According to the migration notes, Blazegraph and LINDAS serve https IRIs since 29 September. QLever was not yet rebuilt as of 1 October.

Not in this PR

Searching by an https taxon IRI, as the "Use as search Term" links do, needs synolib 3.4.8. That release accepts both forms and is on synolib's synolib2 branch. Its JSR publish failed with actorNotScopeMember, so 3.4.8 is not released yet. Once it is, the synolib version here needs to be raised to ^3.4.8.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BpFw1BZH5x7sKpDDCsxubD

claude added 2 commits October 9, 2026 19:49
… menu open while typing

- A custom URL is now stored only together with switching the page to it,
  i.e. once its test passed or on "Use anyway". A failing URL stays a draft
  in the menu (also across closing and reopening) instead of becoming the
  stored endpoint that the next search or page load would use silently.
- While the page uses a server from its link, choosing "Custom URL…" with
  a custom stored endpoint switches back to it (after testing). Before, the
  field showed the stored URL but nothing happened until it was edited.
- On resize or scroll the menu follows the gear while a field in it has
  focus, instead of closing: on phones the on-screen keyboard opening for
  the custom URL field resizes or scrolls the page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BpFw1BZH5x7sKpDDCsxubD
The treatment, taxon-concept, taxon-name and publication IRIs are now
minted with https (plazi/gg2rdf#34); the trt: vocabulary stays http.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BpFw1BZH5x7sKpDDCsxubD
Copilot AI lite review requested due to automatic review settings October 9, 2026 19:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Clear the pending endpoint whenever the custom URL changes before validation.

1 open finding
What changed in this PR

This PR fixes settings-menu endpoint handling and updates SPARQL examples to use HTTPS Plazi IRIs.

Changes:

  • Preserves failed custom endpoints as drafts until accepted.
  • Improves custom endpoint restoration and mobile keyboard behavior.
  • Migrates relevant SPARQL prefixes and example IRIs to HTTPS.
File Summary
src/​components/​SettingsMenu.ts Refines endpoint testing, persistence, and menu behavior. A moderate issue remains where cleared or invalid edits can restore an old pending URL.
src/​advanced.ts Updates Plazi namespaces and example IRIs to HTTPS.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/components/SettingsMenu.ts
An edit to an invalid URL kept the earlier failed URL as the draft, so
reopening the menu showed that one instead of the edit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BpFw1BZH5x7sKpDDCsxubD
Comment thread src/components/SettingsMenu.ts Outdated
Comment thread src/components/SettingsMenu.ts Outdated
Comment thread src/components/SettingsMenu.ts
Comment thread src/components/SettingsMenu.ts Outdated
Comment thread src/components/SettingsMenu.ts
Comment thread src/components/SettingsMenu.ts Outdated
Comment thread src/components/SettingsMenu.ts Outdated
claude added 3 commits October 9, 2026 20:02
Following the gear while a field has focus placed the popover above the
viewport once the page was scrolled far enough, where it stayed open and
kept the focus.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BpFw1BZH5x7sKpDDCsxubD
…or a custom URL

- The popover is placed again on each resize and scroll, at most once per
  frame, and closes only when the gear leaves the view. Without the focus
  special case it also stays open when the on-screen keyboard closes, which
  is when a test result appears.
- Choosing "Custom URL…" no longer applies anything: the field is offered
  for editing, and a "Use" button (or Enter) uses its URL, also unedited,
  e.g. to return from a link's server to the stored custom endpoint.
- After storing, the endpoint is read back, so that with blocked site data
  the menu does not claim the page uses a server from its link.
- One `fromLink` getter for the select placeholder and the note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BpFw1BZH5x7sKpDDCsxubD
- The search field shows "Sadayoshia acamar" as an example again, and
  searching with an empty field searches for it, as in the classic
  version. This got lost when the Vue app was replaced.
- The SynoSpecies title links to "/" again. While this version is served
  under next/ it leads back to the classic version; once it becomes the
  main version it is simply the search page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BpFw1BZH5x7sKpDDCsxubD
@retog retog changed the title Settings menu follow-ups from #188, https IRIs in the example queries Settings menu follow-ups from #188, https IRIs in the examples, search example and title link Oct 9, 2026

@retog retog left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed 842bff6, d920db8 and 60e0aa7. The six settings-menu threads are addressed as described and I resolved them: the popover now repositions once per frame and closes only when the gear leaves the view, choosing Custom URL… no longer navigates, the "Use" form is the explicit way back to a stored custom endpoint, the stored value is read back after saving, and the link check lives in one getter. A failing custom URL is a draft that survives closing the menu and is stored only by Use anyway.

Verified with deno check (against the real Taxomplete source), deno lint (the three pre-existing findings only), and 69 Chromium checks across the four pages at desktop and 375px, including focused scroll, blur-then-resize, the link page with a stored custom endpoint, blocked site data, and the empty search using the example name.

One new comment on the third commit, about the title link going back to /.


Generated by Claude Code

Comment thread dist/index.html
Treatment, taxon-concept and taxon-name IRIs are minted with https since
plazi/gg2rdf#34. SynoTreatment stripped only the http prefixes, so with
https IRIs the treatment ID was the whole URL, which broke the XML and RDF
links built from it, and cited taxa showed their full IRIs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BpFw1BZH5x7sKpDDCsxubD

@retog retog left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 4678c7f (shortPlaziId). The regex covers the three /id/ namespaces in both schemes, the treatment ID that feeds the XML and RDF links is derived the same way as before for http IRIs, and no other http://…plazi.org string handling is left in src/ outside the example queries. deno check passes for SynoTreatment.ts and utils.ts; utils.ts is fmt-clean and SynoTreatment.ts was already unformatted on next. Nothing to add.

The only open thread is the title link on 60e0aa7.


Generated by Claude Code

@retog
retog merged commit 0aa6a93 into next Oct 9, 2026
4 checks passed
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.

3 participants