Skip to content

Fix Markdown view tab reloads - #56

Merged
ernestrc merged 1 commit into
unstablebuild:mainfrom
wthrajat:fix/markdown-view-reload
Sep 15, 2026
Merged

ernestrc merged 1 commit into
unstablebuild:mainfrom
wthrajat:fix/markdown-view-reload

Conversation

@wthrajat

@wthrajat wthrajat commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Closes #3

  • attach a flusher/closer to Markdown view tabs so they can participate in reloads
  • read and parse the updated file off the event loop, then swap the rendered component on Rune's scheduler
  • track the file modification time so filesystem watcher events behave consistently
  • cover both :reloadfile and filesystem watcher reloads

testing

  • go test -race ./internal/text/... ./internal/ide/...
  • make lint

Verified TestMarkdownViewReload, TestReload/reloads_markdown_view, and the full affected suites pass.

@ernestrc ernestrc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for taking this!

Comment thread internal/text/component.go Resolved
Comment thread internal/text/component.go Resolved
Comment thread internal/text/component.go Resolved
@ernestrc

Copy link
Copy Markdown
Contributor

Also, please commit with Signed-off-by: Author Name <[email protected]> to the DCO check passes.

@codecov

codecov Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 7.33945% with 101 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/text/markdown_flusher_closer.go 0.00% 76 Missing ⚠️
internal/text/component.go 0.00% 25 Missing ⚠️

📢 Thoughts on this report? Let us know!

@wthrajat
wthrajat force-pushed the fix/markdown-view-reload branch 3 times, most recently from 92c7544 to aaf6507 Compare September 12, 2026 22:55
@wthrajat

wthrajat commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor Author

@ernestrc thanks for the review! Pushed nits, not resolving the comments myself, leaving that to you
(edit: resolved myseld after approval :p)

@wthrajat

Copy link
Copy Markdown
Contributor Author

@ernestrc can you re run the failed macos job? It probably got timed out since I cannot see an error and also that no change should trigger the failure.

@wthrajat
wthrajat force-pushed the fix/markdown-view-reload branch from 0ebc09e to 3135539 Compare September 14, 2026 22:57
@unstablebuild unstablebuild deleted a comment from coderabbitai Bot Sep 15, 2026
Markdown view tabs had no flusher/closer, so manual and filesystem-triggered
reloads were rejected before Rune could reread the file.

Signed-off-by: wthrajat <[email protected]>
@ernestrc
ernestrc force-pushed the fix/markdown-view-reload branch from 3135539 to 4da7b02 Compare September 15, 2026 19:31
@ernestrc
ernestrc enabled auto-merge (squash) September 15, 2026 20:34
@ernestrc
ernestrc merged commit 241cfc3 into unstablebuild:main Sep 15, 2026
9 checks passed
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.

Markdown view tabs (:view file.md) cannot be reloaded

2 participants