Skip to content

Refactor review feedback: consolidate include paths, improve node lookup semantics#2430

Merged
davydkov merged 2 commits intokieron/shared-filesfrom
copilot/sub-pr-2425
Dec 6, 2025
Merged

Refactor review feedback: consolidate include paths, improve node lookup semantics#2430
davydkov merged 2 commits intokieron/shared-filesfrom
copilot/sub-pr-2425

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 6, 2025

Checklist

  • I've thoroughly read the latest contribution guidelines.
  • I've rebased my branch onto main before creating this PR.
  • My commit messages follow conventional spec
  • I've added tests to cover my changes (if applicable).
  • I've verified that all new and existing tests have passed locally for mobile, tablet, and desktop screen sizes.
  • My change requires documentation updates.
  • I've updated the documentation accordingly.

Description

Addresses review feedback on PR #2425 to improve type safety and API semantics.

Key Changes

ProjectData includePaths consolidation – Merged separate includePaths: URI[] and includePathsAsStrings: ProjectFolder[] arrays into single structure:

interface ProjectData {
  includePaths?: Array<{
    uri: URI
    folder: ProjectFolder
  }>
}

Eliminates possibility of arrays getting out of sync and reduces cognitive overhead.

Node lookup semantics – Renamed findNodeByElementFqn to findNodeByModelFqn and changed return type from NodeId | null to enriched node object:

export const findNodeByModelFqn = <T extends NodeWithData>(
  xynodes: T[],
  elementFqn: Fqn,
): (T & { data: { modelFqn: Fqn } }) | null

Callers now get full node with guaranteed modelFqn property instead of just ID string.

Auto-unfocus timing – Changed AUTO_UNFOCUS_DELAY from 0 to 3000ms. Previous value made conditional check always false, disabling intended behavior.

Test cleanup – Removed autogenerated test file with no actual assertions.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Add include configuration option to LikeC4 project Refactor review feedback: consolidate include paths, improve node lookup semantics Dec 6, 2025
Copilot AI requested a review from davydkov December 6, 2025 22:48
@davydkov davydkov marked this pull request as ready for review December 6, 2025 22:52
@davydkov davydkov merged commit 6696948 into kieron/shared-files Dec 6, 2025
17 checks passed
@davydkov davydkov deleted the copilot/sub-pr-2425 branch December 6, 2025 22:55
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