<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: 彭钰璘（Dexter）</title>
    <description>The latest articles on DEV Community by 彭钰璘（Dexter） (@dexter_b95966b3d296e).</description>
    <link>https://dev.to/dexter_b95966b3d296e</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3843488%2F9d5cf780-5887-44d5-b2ee-d9e9670406ae.jpg</url>
      <title>DEV Community: 彭钰璘（Dexter）</title>
      <link>https://dev.to/dexter_b95966b3d296e</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dexter_b95966b3d296e"/>
    <language>en</language>
    <item>
      <title>I Built a Visual Branching Code History Plugin for IntelliJ IDEA</title>
      <dc:creator>彭钰璘（Dexter）</dc:creator>
      <pubDate>Wed, 25 Mar 2026 16:31:39 +0000</pubDate>
      <link>https://dev.to/dexter_b95966b3d296e/i-built-a-visual-branching-code-history-plugin-for-intellij-idea-4fh6</link>
      <guid>https://dev.to/dexter_b95966b3d296e/i-built-a-visual-branching-code-history-plugin-for-intellij-idea-4fh6</guid>
      <description>&lt;p&gt;Have you ever been coding, gone down a rabbit hole, and then wished you could just go back to where you started — but your undo history was long gone?&lt;br&gt;
That's the problem I ran into constantly. So I built TimeRail: a free IntelliJ IDEA plugin that snapshots your editor state and lets you restore any past state with one click.&lt;br&gt;
What Makes It Different from Local History?&lt;br&gt;
IntelliJ already has a built-in Local History feature, but it only tracks file-level changes. TimeRail tracks your entire editor session — all your open tabs, their scroll positions, and what you were looking at — as a single snapshot.&lt;br&gt;
The bigger difference: branching.&lt;br&gt;
When you restore a past snapshot in TimeRail, it doesn't overwrite your history. It creates a new branch in the tree. So you can go back in time, try something different, and your "future" is still there waiting for you on another branch.&lt;br&gt;
How It Works&lt;/p&gt;

&lt;p&gt;Snap — Click the 📸 button to save your current editor state&lt;br&gt;
Browse — The branching tree shows all your snapshots with screenshot thumbnails&lt;br&gt;
Restore — Click any snapshot to jump back to that exact state&lt;/p&gt;

&lt;p&gt;Every restore automatically branches the tree, so you always have a visual record of every direction you explored.&lt;br&gt;
Show Image&lt;br&gt;
The Tech Stack&lt;br&gt;
Built with Kotlin on top of the IntelliJ Platform SDK. A few interesting technical challenges:&lt;/p&gt;

&lt;p&gt;Screenshot capture: Using Robot.createScreenCapture() mapped to each editor window's screen coordinates&lt;br&gt;
Branching tree rendering: A custom Swing canvas with paintComponent and g2.scale() for zoom — all rendering in a single pass for reliability&lt;br&gt;
Scroll behavior: Implementing the Scrollable interface with getScrollableTracksViewportHeight() = false to get correct scroll range after zooming&lt;br&gt;
Click detection: Hit-testing mouse coordinates divided by the current scale factor&lt;/p&gt;

&lt;p&gt;One thing I learned the hard way: Mac trackpads don't deliver native pinch gestures to Java Swing as MouseWheelEvent. After spending way too long on this, I ended up implementing +/− zoom buttons instead — sometimes the simple solution is the right one.&lt;br&gt;
Get It&lt;/p&gt;

&lt;p&gt;🔌 JetBrains Marketplace: plugins.jetbrains.com/plugin/30869-timerail&lt;br&gt;
💻 GitHub: github.com/DexterPeng117/TimeRail&lt;/p&gt;

&lt;p&gt;Compatible with IntelliJ IDEA 2024.1+ (and other JetBrains IDEs based on the IntelliJ platform).&lt;br&gt;
What's Next&lt;br&gt;
A few things I'm thinking about:&lt;/p&gt;

&lt;p&gt;Auto-snapshot on a timer&lt;br&gt;
Snapshot labels / notes&lt;br&gt;
Export/import snapshot history&lt;/p&gt;

&lt;p&gt;If you try it out, I'd love any feedback — open an issue on GitHub or drop a comment here!&lt;/p&gt;

</description>
      <category>intellij</category>
      <category>kotlin</category>
      <category>plugin</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
