[PR #245] [MERGED] Show Direct Links from either endpoint #876

Closed
opened 2026-10-20 17:31:54 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/245
Author: @thetopham
Created: 8/5/2026
Status: ✅ Merged
Merged: 8/5/2026
Merged by: @thetopham

Base: staging ← Head: agent/243-direct-link-endpoint-parity


📝 Commits (5)

  • 0063b0f feat: show direct links from both endpoints
  • 8d1faea fix: prevent duplicate direct link relationships
  • 058f0ee fix: collapse reciprocal direct link rows
  • 10420b1 Merge remote-tracking branch 'origin/staging' into agent/243-direct-link-endpoint-parity
  • e4245c9 fix: make direct link direction explicit

📊 Changes

13 files changed (+810 additions, -203 deletions)

View changed files

➕ artifacts/hierarchical-maps-1.3.2.zip (+0 -0)
📝 catalog/catalog.json (+7 -7)
📝 catalog/v2/catalog.json (+7 -7)
📝 catalog/v3/catalog.json (+7 -7)
📝 packages/hierarchical-maps/client.js (+55 -53)
📝 packages/hierarchical-maps/manifest.json (+3 -3)
📝 packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/SpatialMapWorkspace.tsx (+29 -10)
📝 packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/components/LocationInspector.tsx (+247 -102)
📝 packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/editor-state.ts (+153 -0)
📝 scripts/build-feature-packages.mjs (+1 -1)
📝 tests/hierarchical-maps-lifecycle.regression.ts (+20 -12)
📝 tests/spatial-context.e2e.ts (+227 -0)
📝 tests/world-maps-ui-contract.regression.mjs (+54 -1)

📄 Description

Pull request

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #243

Why this change

  • A legacy or damaged map can contain reciprocal records for one Direct Link. Editing one raw record could leave the other unchanged, so both endpoints displayed contradictory Both ways and one-way rows.
  • Direction relative to the selected location has three states, so a Both ways checkbox cannot express the full relationship clearly.

What changed

  • Replace the Both ways checkbox with a Direction select containing Outgoing, Both ways, and Incoming.
  • Treat each unordered pair of locations as one canonical relationship and apply direction, field, and removal edits atomically.
  • Repair damaged reciprocal records during editing, export, and every save path without changing the persisted schema.
  • Keep incoming one-way rows read-only with direction cues, source breadcrumb, and View source; keep outgoing and two-way rows editable from either endpoint.
  • Exclude relationships already represented from either endpoint from the target picker.
  • Add focused desktop/mobile browser coverage for duplicate repair, all direction transitions, opposite-endpoint parity, saved ownership, pair removal, and one-way source navigation.
  • Rebuild World Maps 1.3.2, its manifest, ZIP artifact, client payload, and every catalog lane.

Package and security impact

  • Affected package IDs: hierarchical-maps
  • Engine compatibility impact: remains >=2.4.1 <4.0.0
  • New or changed permissions/entrypoints: none
  • Restart, storage, update, or uninstall impact: existing package update restart remains required; storage and uninstall contracts are unchanged

Validation

  • node scripts/validate-catalog.mjs passes locally
  • git diff --check passes locally
  • Rebuilt every affected manifest, payload, artifact, and catalog entry
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

Automated evidence:

  • node tests/world-maps-ui-contract.regression.mjs passes.
  • node scripts/test-catalog-lanes.mjs passes.
  • node scripts/validate-catalog.mjs passes: 31 packages; v2, v3, and legacy lanes valid.
  • git diff --check passes.
  • Exact World Maps 1.3.2 artifact lifecycle regression passes against Marinara Engine 2.4.1, including update, restart/offline, removal, reinstall, backup, and restore paths.
  • Focused Direct Link Playwright regression passes in desktop Chromium at 1440x900 and mobile Chromium at 390x844.
  • World Maps 1.3.2 ZIP SHA-256: 9a498dd1ec05c29f11293ce6d7e219b6ed111b18ed3dfe250bdf18dce9d884c8 (348238 bytes).

Manual verification notes

  • Installed the exact rebuilt World Maps 1.3.2 artifact into the local Marinara Engine 2.4.1 review runtime.
  • Package state is active / ready; installed, committed, and served client SHA-256 values match fdc5ffa56684baaf48f255d3aa84ec0d65f7aff1cd9afaf49eeeaf0d83ec6722.
  • The maintainer reviewed the installed UI and reported that it looks good.

Documentation impact

  • No documentation changes needed
  • Updated this README catalog and package guidance
  • Updated linked Marinara Engine documentation

No documentation change is proposed because this repairs existing Direct Link editing semantics without changing package setup or compatibility guidance.

UI evidence (if applicable)

  • The focused scenario starts with reciprocal duplicate two-way records and proves one row from either endpoint.
  • It exercises Outgoing, Both ways, and Incoming, verifies immediate opposite-endpoint state, and asserts that save leaves exactly one record with the selected ownership and direction.
  • It removes the relationship and verifies that both raw records are gone while an unrelated incoming one-way link remains read-only and navigable through View source.

Summary by CodeRabbit

  • New Features

    • Direct Links now support outgoing, incoming, and bidirectional directions.
    • Inspect, navigate, edit, update, and remove links from either location endpoint.
    • Link pickers exclude locations that are already connected.
    • Link definitions are normalized consistently when saved, exported, or shared.
  • Bug Fixes

    • Improved handling of duplicate, missing, and self-referencing links.
    • Preserved link metadata and direction when updating connections.
  • Chores

    • Updated Hierarchical Maps to version 1.3.2.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Agents/pull/245 **Author:** [@thetopham](https://github.com/thetopham) **Created:** 8/5/2026 **Status:** ✅ Merged **Merged:** 8/5/2026 **Merged by:** [@thetopham](https://github.com/thetopham) **Base:** `staging` ← **Head:** `agent/243-direct-link-endpoint-parity` --- ### 📝 Commits (5) - [`0063b0f`](https://github.com/Pasta-Devs/Marinara-Agents/commit/0063b0f4b0267e7c9a342b2714d337cd3f2d3b4c) feat: show direct links from both endpoints - [`8d1faea`](https://github.com/Pasta-Devs/Marinara-Agents/commit/8d1faea842882af2811008ddee59e0762690ca3e) fix: prevent duplicate direct link relationships - [`058f0ee`](https://github.com/Pasta-Devs/Marinara-Agents/commit/058f0eee4c48b491005979502c23de21a0d326fd) fix: collapse reciprocal direct link rows - [`10420b1`](https://github.com/Pasta-Devs/Marinara-Agents/commit/10420b1a27b1f458bfb63e9045114120aedcd50b) Merge remote-tracking branch 'origin/staging' into agent/243-direct-link-endpoint-parity - [`e4245c9`](https://github.com/Pasta-Devs/Marinara-Agents/commit/e4245c959eda07086544896edf5964e066da5a35) fix: make direct link direction explicit ### 📊 Changes **13 files changed** (+810 additions, -203 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/hierarchical-maps-1.3.2.zip` (+0 -0) 📝 `catalog/catalog.json` (+7 -7) 📝 `catalog/v2/catalog.json` (+7 -7) 📝 `catalog/v3/catalog.json` (+7 -7) 📝 `packages/hierarchical-maps/client.js` (+55 -53) 📝 `packages/hierarchical-maps/manifest.json` (+3 -3) 📝 `packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/SpatialMapWorkspace.tsx` (+29 -10) 📝 `packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/components/LocationInspector.tsx` (+247 -102) 📝 `packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/editor-state.ts` (+153 -0) 📝 `scripts/build-feature-packages.mjs` (+1 -1) 📝 `tests/hierarchical-maps-lifecycle.regression.ts` (+20 -12) 📝 `tests/spatial-context.e2e.ts` (+227 -0) 📝 `tests/world-maps-ui-contract.regression.mjs` (+54 -1) </details> ### 📄 Description # Pull request > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #243 ## Why this change - A legacy or damaged map can contain reciprocal records for one Direct Link. Editing one raw record could leave the other unchanged, so both endpoints displayed contradictory `Both ways` and one-way rows. - Direction relative to the selected location has three states, so a `Both ways` checkbox cannot express the full relationship clearly. ## What changed - Replace the `Both ways` checkbox with a `Direction` select containing `Outgoing`, `Both ways`, and `Incoming`. - Treat each unordered pair of locations as one canonical relationship and apply direction, field, and removal edits atomically. - Repair damaged reciprocal records during editing, export, and every save path without changing the persisted schema. - Keep incoming one-way rows read-only with direction cues, source breadcrumb, and `View source`; keep outgoing and two-way rows editable from either endpoint. - Exclude relationships already represented from either endpoint from the target picker. - Add focused desktop/mobile browser coverage for duplicate repair, all direction transitions, opposite-endpoint parity, saved ownership, pair removal, and one-way source navigation. - Rebuild World Maps 1.3.2, its manifest, ZIP artifact, client payload, and every catalog lane. ## Package and security impact - Affected package IDs: `hierarchical-maps` - Engine compatibility impact: remains `>=2.4.1 <4.0.0` - New or changed permissions/entrypoints: none - Restart, storage, update, or uninstall impact: existing package update restart remains required; storage and uninstall contracts are unchanged ## Validation - [x] `node scripts/validate-catalog.mjs` passes locally - [ ] `git diff --check` passes locally - [ ] Rebuilt every affected manifest, payload, artifact, and catalog entry - [x] Installed or updated the affected package through Marinara Engine - [ ] Checked supported modes, restart behavior, and uninstall cleanup - [ ] Read and followed `CONTRIBUTING.md` Automated evidence: - `node tests/world-maps-ui-contract.regression.mjs` passes. - `node scripts/test-catalog-lanes.mjs` passes. - `node scripts/validate-catalog.mjs` passes: 31 packages; v2, v3, and legacy lanes valid. - `git diff --check` passes. - Exact World Maps 1.3.2 artifact lifecycle regression passes against Marinara Engine 2.4.1, including update, restart/offline, removal, reinstall, backup, and restore paths. - Focused Direct Link Playwright regression passes in desktop Chromium at 1440x900 and mobile Chromium at 390x844. - World Maps 1.3.2 ZIP SHA-256: `9a498dd1ec05c29f11293ce6d7e219b6ed111b18ed3dfe250bdf18dce9d884c8` (`348238` bytes). ### Manual verification notes - Installed the exact rebuilt World Maps 1.3.2 artifact into the local Marinara Engine 2.4.1 review runtime. - Package state is `active` / `ready`; installed, committed, and served client SHA-256 values match `fdc5ffa56684baaf48f255d3aa84ec0d65f7aff1cd9afaf49eeeaf0d83ec6722`. - The maintainer reviewed the installed UI and reported that it looks good. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation No documentation change is proposed because this repairs existing Direct Link editing semantics without changing package setup or compatibility guidance. ## UI evidence (if applicable) - The focused scenario starts with reciprocal duplicate two-way records and proves one row from either endpoint. - It exercises `Outgoing`, `Both ways`, and `Incoming`, verifies immediate opposite-endpoint state, and asserts that save leaves exactly one record with the selected ownership and direction. - It removes the relationship and verifies that both raw records are gone while an unrelated incoming one-way link remains read-only and navigable through `View source`. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Direct Links now support outgoing, incoming, and bidirectional directions. * Inspect, navigate, edit, update, and remove links from either location endpoint. * Link pickers exclude locations that are already connected. * Link definitions are normalized consistently when saved, exported, or shared. * **Bug Fixes** * Improved handling of duplicate, missing, and self-referencing links. * Preserved link metadata and direction when updating connections. * **Chores** * Updated Hierarchical Maps to version 1.3.2. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-20 17:31:54 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#876
No description provided.