<?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: Frederik Hudák</title>
    <description>The latest articles on DEV Community by Frederik Hudák (@frehu).</description>
    <link>https://dev.to/frehu</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%2F3785090%2Ff46c58b5-5f1f-4211-b960-7c136d4d6f0a.jpeg</url>
      <title>DEV Community: Frederik Hudák</title>
      <link>https://dev.to/frehu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/frehu"/>
    <language>en</language>
    <item>
      <title>Useful vscode extension patterns - Update Notification</title>
      <dc:creator>Frederik Hudák</dc:creator>
      <pubDate>Sat, 30 May 2026 12:14:27 +0000</pubDate>
      <link>https://dev.to/frehu/useful-vscode-extension-patterns-update-notification-2l50</link>
      <guid>https://dev.to/frehu/useful-vscode-extension-patterns-update-notification-2l50</guid>
      <description>&lt;p&gt;Basic problem - when you ship a new version, you want users to know and look at what's changed.&lt;/p&gt;

&lt;p&gt;I will demonstrate a simple pattern you can reuse in your extension. The result is exactly this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3olrkkfzc38da6yd74ha.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3olrkkfzc38da6yd74ha.png" alt="notification"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Don't wing it
&lt;/h1&gt;

&lt;p&gt;Winging a notification on startup introduces two problems: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;brand-new installs get a toast for software they just installed&lt;/li&gt;
&lt;li&gt;the toast fires again on every window reload. your users will uninstall.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Proper solution
&lt;/h1&gt;

&lt;p&gt;On activation, compare the running version against the last version you told the user about. The "last notified" version is persisted in &lt;code&gt;globalState&lt;/code&gt;, which is shared across all windows and survives restarts.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;stored == none     → fresh install   → store silently, never notify
stored == current  → reload/restart  → silent
current  &amp;gt; stored  → update          → store, notify if the bump clears the user's preference
current  &amp;lt; stored  → downgrade       → store, stay silent
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We also introduce a user preference where they can set if they want to be notified about major/minor/patch versions.&lt;/p&gt;

&lt;h1&gt;
  
  
  Don't overcomplicate the changelog
&lt;/h1&gt;

&lt;p&gt;It can and should be dead simple - you don't need a webview. Keep a &lt;code&gt;CHANGELOG.md&lt;/code&gt;, bundle it with the extension, then have the "what's new" button open a preview.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;uri&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;vscode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Uri&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;joinPath&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;extensionUri&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;CHANGELOG.md&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;vscode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;commands&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;executeCommand&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;markdown.showPreview&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;uri&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Side benefit
&lt;/h1&gt;

&lt;p&gt;When your extension inevitably becomes compromised and the hackers publish a malicious new version for you, at least your users get a nice toast message.&lt;/p&gt;

&lt;p&gt;I don't think they'll bother to add a changelog entry though.&lt;/p&gt;

&lt;h1&gt;
  
  
  Example code
&lt;/h1&gt;

&lt;p&gt;Self-contained example extension can be found here:&lt;br&gt;
&lt;a href="https://github.com/FreHu/vscode-update-notification" rel="noopener noreferrer"&gt;https://github.com/FreHu/vscode-update-notification&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The example was carved out from my larger extension, &lt;a href="https://github.com/FreHu/vscode-fresh-file-explorer" rel="noopener noreferrer"&gt;Fresh File Explorer&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have a few more up my sleeve and plan to turn this into a short series with similar self-contained examples.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>tooling</category>
      <category>tutorial</category>
      <category>vscode</category>
    </item>
    <item>
      <title>Fresh File Explorer - vscode extension for navigating recent changes</title>
      <dc:creator>Frederik Hudák</dc:creator>
      <pubDate>Sun, 22 Feb 2026 14:30:53 +0000</pubDate>
      <link>https://dev.to/frehu/fresh-file-explorer-vscode-extension-for-navigating-recent-changes-13c1</link>
      <guid>https://dev.to/frehu/fresh-file-explorer-vscode-extension-for-navigating-recent-changes-13c1</guid>
      <description>&lt;p&gt;Do you have a large codebase where 98% of the files are not relevant at any given moment, but you have to scroll past them?&lt;/p&gt;

&lt;p&gt;Maybe you use the SCM view to keep track, but after you make a commit, your context disappears?&lt;/p&gt;

&lt;p&gt;That's my motivation behind making &lt;strong&gt;Fresh File Explorer&lt;/strong&gt; — a VS Code extension that shows you a mix of your pending changes and recent history (x days ago, up to you), the way you'd see it in the file explorer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq0qhy3a4ej8cug5npfy0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq0qhy3a4ej8cug5npfy0.png" alt="main view" width="658" height="797"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A few highlights:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multi-repo support.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deleted files stay visible.&lt;/strong&gt; You don't have to go through git history to find them again. Right-click → &lt;em&gt;Resurrect&lt;/em&gt; to restore them in one step.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Search tools.&lt;/strong&gt; Search scoped to only your fresh files. For not-so-fresh changes, there's Diff search (pickaxe), line/function history (&lt;code&gt;git log -L&lt;/code&gt;), file history, and also searching inside search results.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8a8qrpenw59igdzktba6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8a8qrpenw59igdzktba6.png" alt="diff search" width="665" height="1320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1fxdr4kund4p1pzw8ie5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1fxdr4kund4p1pzw8ie5.png" alt="file history" width="800" height="394"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pinned section.&lt;/strong&gt; Keep any file handy regardless of the time window. Readme on your desktop, a deleted file, or add short notes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Grouping modes.&lt;/strong&gt; Beyond the standard folder structure, you can group by author, commit, or moon phase.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Heatmap.&lt;/strong&gt; Colorize files based on how recently they changed. This is not specific to the Fresh Files view and also works in the file explorer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flt4tck1mlqzy418q53f2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flt4tck1mlqzy418q53f2.png" alt="heatmap" width="660" height="983"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The extension currently has more features than users, so I'd appreciate your feedback.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/FreHu/vscode-fresh-file-explorer" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; | &lt;a href="https://marketplace.visualstudio.com/items?itemName=frehu.fresh-file-explorer" rel="noopener noreferrer"&gt;VS Code Marketplace&lt;/a&gt; | &lt;a href="https://open-vsx.org/extension/frehu/fresh-file-explorer" rel="noopener noreferrer"&gt;OpenVSX&lt;/a&gt;&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>productivity</category>
      <category>git</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
