Skip to content

fix(cm6): prevent backlinks rendering in edited table cells - #116

Open
rudironsoni wants to merge 31 commits into
jensmtg:masterfrom
rudironsoni:feature/fix-table-cell-backlinks
Open

fix(cm6): prevent backlinks rendering in edited table cells#116
rudironsoni wants to merge 31 commits into
jensmtg:masterfrom
rudironsoni:feature/fix-table-cell-backlinks

Conversation

@rudironsoni

Copy link
Copy Markdown

This pull request introduces a beta release workflow, improves plugin versioning for beta releases, and adds utilities for handling markdown table placement in the editor. The main themes are CI/CD automation for beta releases, Serena IDE project support, and enhancements to the CodeMirror 6 (CM6) editor integration.

Key changes:

CI/CD Automation and Beta Release Support

  • Added a new GitHub Actions workflow (.github/workflows/beta-release.yml) that automates beta releases on feature, fix, chore, and related branches. This workflow computes a beta SemVer, updates plugin manifests, builds the plugin, and creates a prerelease on GitHub.
  • Updated package.json and manifest.json to use the new beta version (2.2.0-beta.13) and added a separate manifest-beta.json for beta metadata. [1] [2] [3]

CM6 Editor Enhancements

  • Added placement-utils helpers and corresponding tests to improve detection and handling of markdown tables in the editor. The widget placement now correctly skips over frontmatter and tables when determining where to insert the Influx widget. [1] [2] [3] [4] [5]
  • Removed the old frontmatter position logic in favor of the new utility-based approach for more robust placement.

Documentation

  • Added AGENTS.md with instructions for using the RTK (Rust Token Killer) tool to optimize shell command output for LLM agents.

rudironsoni and others added 29 commits June 16, 2026 20:19
Copilot AI review requested due to automatic review settings July 1, 2026 07:37
@rudironsoni

Copy link
Copy Markdown
Author

@semanticdata

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.

Pull request overview

This PR combines (1) CM6/editor-side changes to avoid rendering Influx/backlinks in table editing contexts and (2) beta-release automation and metadata updates to support prerelease publishing.

Changes:

  • Add render guards + CSS rules to prevent Influx preview/backlinks from showing inside CM6 live-editor/table contexts.
  • Introduce CM6 placement utilities (with tests) to better place the widget around frontmatter / leading tables.
  • Add a GitHub Actions beta release workflow and beta-oriented manifest/versioning files.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
versions.json Adds a set of beta versions to the version map for compatibility/release tooling.
styles.css Hides Influx/backlinks elements inside table-related DOM contexts (especially in live editor).
src/render-utils.ts Adds shouldRenderInfluxForMarkdownElement to gate preview post-processing in problematic contexts.
src/render-utils.test.ts Adds unit tests for the new preview render gating logic.
src/main.tsx Uses the new render guard to skip preview-mode postprocessing in live-editor/table contexts.
src/cm6/StatefulDecorationSet.tsx Switches CM6 anchor placement to new utilities and adds table-related suppression logic.
src/cm6/placement-utils.ts Adds helpers to detect frontmatter/tables and compute widget placement (plus table detection helpers).
src/cm6/placement-utils.test.ts Adds test coverage for placement and basic table/selection detection.
package.json Updates package version to a beta prerelease version.
manifest.json Updates plugin manifest version to the beta prerelease version.
manifest-beta.json Adds a dedicated beta manifest file for prerelease metadata.
AGENTS.md Documents RTK command-prefixing guidance for LLM/agent workflows.
.serena/project.yml Adds Serena IDE project configuration.
.serena/.gitignore Ignores Serena cache and local overrides.
.github/workflows/beta-release.yml Adds automated beta release workflow: compute prerelease semver, update manifests, build, attest, and publish prerelease.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 18 to +21
async computeAsyncDecorations(state: EditorState, show: boolean): Promise<DecorationSet | null> {
if (containsMarkdownTable(state) || isSelectionInMarkdownTable(state)) {
return Decoration.none;
}
Comment on lines +92 to +100
export function containsMarkdownTable(state: EditorState): boolean {
const { doc } = state;
for (let lineNumber = 1; lineNumber <= doc.lines; lineNumber++) {
if (isMarkdownTableRow(doc.line(lineNumber).text)) {
return true;
}
}
return false;
}
Comment thread styles.css
Comment on lines +22 to +41
table .embedded-backlinks,
table .influx-preview-wrapper,
table influx-preview-container,
table obsidian-influx-element,
.markdown-source-view table .embedded-backlinks,
.markdown-source-view table .influx-preview-wrapper,
.markdown-source-view table influx-preview-container,
.markdown-source-view table obsidian-influx-element,
.markdown-source-view .HyperMD-table-row .embedded-backlinks,
.markdown-source-view .HyperMD-table-row .influx-preview-wrapper,
.markdown-source-view .HyperMD-table-row influx-preview-container,
.markdown-source-view .HyperMD-table-row obsidian-influx-element,
.markdown-source-view .cm-table-widget .embedded-backlinks,
.markdown-source-view .cm-table-widget .influx-preview-wrapper,
.markdown-source-view .cm-table-widget influx-preview-container,
.markdown-source-view .cm-table-widget obsidian-influx-element,
.markdown-source-view .cm-table-editor .embedded-backlinks,
.markdown-source-view .cm-table-editor .influx-preview-wrapper,
.markdown-source-view .cm-table-editor influx-preview-container,
.markdown-source-view .cm-table-editor obsidian-influx-element {
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