Skip to content

fix: Strip module prefix correctly for Part tables in diagrams#1392

Merged
MilagrosMarin merged 2 commits intomasterfrom
fix/diagram-part-table-names
Feb 6, 2026
Merged

fix: Strip module prefix correctly for Part tables in diagrams#1392
MilagrosMarin merged 2 commits intomasterfrom
fix/diagram-part-table-names

Conversation

@dimitri-yatsenko
Copy link
Member

Summary

  • Fix Part table names displaying with module prefix in diagrams (e.g., scan.Scans.Scan instead of Scans.Scan)

Problem

The previous logic used rsplit(".", 1) to strip module prefixes, which only split at the last dot. For Part tables with names like scan.Scans.Scan, this resulted in:

  • prefix = "scan.Scans"
  • Comparison with cluster label "scan" failed
  • Display name kept full scan.Scans.Scan

Solution

Use startswith() to check if the name begins with the cluster label, then strip that prefix:

if cluster_label and name.startswith(cluster_label + "."):
    display_name = name[len(cluster_label) + 1:]

This correctly handles both regular tables (scan.ScansScans) and Part tables (scan.Scans.ScanScans.Scan).

Test plan

  • Verified fix logic with debug output
  • Test with lcms-demo pipeline diagrams

Fixes #1390

🤖 Generated with Claude Code

dimitri-yatsenko and others added 2 commits February 6, 2026 09:43
Previously, Part table names like `scan.Scans.Scan` would display with
the full module prefix because the logic used rsplit(".", 1) which only
split at the last dot. This meant the prefix `scan.Scans` didn't match
the cluster label `scan`.

Now uses startswith() to check if the name begins with the cluster label,
then strips that prefix. This correctly displays Part tables as
`Scans.Scan` instead of `scan.Scans.Scan`.

Fixes #1390

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@MilagrosMarin MilagrosMarin merged commit a566677 into master Feb 6, 2026
7 checks passed
@MilagrosMarin MilagrosMarin deleted the fix/diagram-part-table-names branch February 6, 2026 16:13
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.

Part table names in diagrams include module prefix

2 participants