fix(import-tool,viewer): ship pipeline rewrite + exhibition nav fixes (#1422)

Commit: 7a15b28702c75aab26f7769ba6d934ffc8fd1671
Date: 2026-07-05 14:28:16 +0200
Author: PascalHavelange

Commit Message

fix(import-tool,viewer): ship pipeline rewrite + exhibition nav fixes (#1422)

* fix (importer): Renamed root collection for ISL Virtual Exhibitions

- **Importer**: renamed the marker collection's title to "Virtual Exhibitions" in [exhibitions-root-collection-importer.ts](scripts/importer/src/importers/phase-01/exhibitions-root-collection-importer.ts), plus consistent updates to the doc comments and log messages in `mwnf3-exhibition-importer.ts` and the CLI pipeline entry name in `cli/import.ts`. Left `internal_name`/`backward_compatibility`/the `key:` pipeline identifier unchanged — those are stable pipeline keys, not display text.
- **Exporter**: confirmed no change needed — it's fully data-driven (reads `title` from `collection_translations` at export time, no hardcoded strings).
- **Database**: ran the SQL update against the **local docker DB only** (port 3316) — confirmed the row changed from "Exhibitions" → "Virtual Exhibitions". OVH was left untouched, since `ship` hasn't run yet.
- Typecheck and lint both clean.

* fix(import-tool): load ship dump on OVH itself, not through the tunnel

The previous `ship` implementation opened the SSH tunnel and loaded the
staged dump through it, statement by statement, via a hand-rolled SQL
parser -- reproducing the exact slow per-row network round-trip cost
that `stage`/`ship` exist to eliminate (confirmed in practice: over an
hour in, nowhere near done, for ~328k single-row statements).

Now: scp the dump to OVH and load it there against its own local MySQL
(same host, loopback) using OVH's own real `mysql` client -- which,
unlike this tool's own Alpine/MariaDB client, has no
caching_sha2_password limitation, since it matches its own server.
Every statement becomes local-loopback I/O instead of a WAN round-trip
(confirmed in practice: full ship run, wipe through glossary resync,
completed in under 5 minutes).

Also fixes a latent ordering bug this surfaced along the way: mysqldump
wraps its data dump in FOREIGN_KEY_CHECKS=0/1 toggles so tables load in
any order regardless of foreign keys -- but nothing needed to preserve
those anymore now that the whole file loads natively, so the dead
manual statement-splitting/comment-filtering code (and the load-sql
command it lived in) is removed entirely.

* fix(viewer): exhibition theme page navigation + back-link title

Verified against real reimported production data and the legacy site:

- Back-link showed the raw internal_name instead of the exhibition's
  translated title.
- Multi-page themes showed named tabs (correct for Artistic
  Introduction's fixed Monuments/Objects split, but wrong here --
  confirmed against the live site: exhibition.php navigates a theme's
  pages with "< Previous page | Next page >", never a tab strip, since
  a theme's pages are often just paginated continuations of one
  narrative rather than a fixed category split -- their page_title is
  frequently identical across all of a theme's pages). Replaced with
  Previous/Next pagination, and the heading now shows the active
  page's own title rather than the theme's, matching the legacy
  per-page heading.

Also bumps @metanull/islamicart-data to 1.0.18, published from the
freshly reimported production data (Artistic Introduction + Exhibitions
marker collections, the renamed "Virtual Exhibitions" collection, and
the collection_item.extra.details export fix).

---------

Co-authored-by: Pascal HAVELANGE <havelangep@hotmail.com>

Files Changed


This documentation was automatically generated from Git commit data.