diff --git a/apps/desktop/src/components/main/body/changelog/index.tsx b/apps/desktop/src/components/main/body/changelog/index.tsx index 460ea352f2..1506b9abb7 100644 --- a/apps/desktop/src/components/main/body/changelog/index.tsx +++ b/apps/desktop/src/components/main/body/changelog/index.tsx @@ -1,14 +1,73 @@ import { openUrl } from "@tauri-apps/plugin-opener"; +import { ExternalLinkIcon, SparklesIcon } from "lucide-react"; import { - ExternalLinkIcon, - GitCompareArrowsIcon, - SparklesIcon, -} from "lucide-react"; + type RefObject, + useCallback, + useEffect, + useRef, + useState, +} from "react"; +import { useResizeObserver } from "usehooks-ts"; + +import NoteEditor from "@hypr/tiptap/editor"; +import { md2json } from "@hypr/tiptap/shared"; +import { + Breadcrumb, + BreadcrumbItem, + BreadcrumbList, + BreadcrumbPage, + BreadcrumbSeparator, +} from "@hypr/ui/components/ui/breadcrumb"; +import { Button } from "@hypr/ui/components/ui/button"; +import { cn } from "@hypr/utils"; import { type Tab } from "../../../../store/zustand/tabs"; import { StandardTabWrapper } from "../index"; import { type TabItem, TabItemBase } from "../shared"; +export const changelogFiles = import.meta.glob( + "../../../../../../web/content/changelog/*.mdx", + { query: "?raw", import: "default" }, +); + +export function getLatestVersion(): string | null { + const versions = Object.keys(changelogFiles) + .map((k) => { + const match = k.match(/\/([^/]+)\.mdx$/); + return match ? match[1] : null; + }) + .filter((v): v is string => v !== null) + .filter((v) => !v.includes("nightly")) + .sort((a, b) => b.localeCompare(a, undefined, { numeric: true })); + + return versions[0] || null; +} + +function stripFrontmatter(content: string): string { + return content.trim(); +} + +function stripImageLine(content: string): string { + return content.replace(/^!\[.*?\]\(.*?\)\s*\n*/m, ""); +} + +function addEmptyParagraphsBeforeHeaders( + json: ReturnType, +): ReturnType { + if (!json.content) return json; + + const newContent: typeof json.content = []; + for (let i = 0; i < json.content.length; i++) { + const node = json.content[i]; + if (node.type === "heading" && i > 0) { + newContent.push({ type: "paragraph" }); + } + newContent.push(node); + } + + return { ...json, content: newContent }; +} + export const TabItemChangelog: TabItem> = ({ tab, tabIndex, @@ -39,43 +98,149 @@ export function TabContentChangelog({ }: { tab: Extract; }) { - const { previous, current } = tab.state; + const { current } = tab.state; + + const { content, loading } = useChangelogContent(current); + const { scrollRef, atStart, atEnd } = useScrollFade(); return ( -
-
-

- Updated to v{current} +
+
+ +
+ +
+

+ What's new in {current}?

- {previous && ( -

from v{previous}

- )}
-
- - {previous && ( - - )} +
+ {!atStart && } + {!atEnd && } +
+ {loading ? ( +

Loading...

+ ) : content ? ( + + ) : ( +

+ No changelog available for this version. +

+ )} +
); } + +function ChangelogHeader({ version }: { version: string }) { + return ( +
+
+
+ + + + Changelog + + + + {version} + + + +
+ +
+ +
+
+
+ ); +} + +function useChangelogContent(version: string) { + const [content, setContent] = useState | null>( + null, + ); + const [loading, setLoading] = useState(true); + + useEffect(() => { + const key = Object.keys(changelogFiles).find((k) => + k.endsWith(`/${version}.mdx`), + ); + + if (!key) { + setLoading(false); + return; + } + + changelogFiles[key]() + .then((raw) => { + const markdown = stripImageLine(stripFrontmatter(raw as string)); + const json = md2json(markdown); + setContent(addEmptyParagraphsBeforeHeaders(json)); + setLoading(false); + }) + .catch(() => { + setContent(null); + setLoading(false); + }); + }, [version]); + + return { content, loading }; +} + +function useScrollFade() { + const scrollRef = useRef(null); + const [state, setState] = useState({ atStart: true, atEnd: true }); + + const update = useCallback(() => { + const el = scrollRef.current; + if (!el) return; + + const { scrollTop, scrollHeight, clientHeight } = el; + setState({ + atStart: scrollTop <= 1, + atEnd: scrollTop + clientHeight >= scrollHeight - 1, + }); + }, []); + + useResizeObserver({ ref: scrollRef as RefObject, onResize: update }); + + useEffect(() => { + const el = scrollRef.current; + if (!el) return; + + update(); + el.addEventListener("scroll", update); + return () => el.removeEventListener("scroll", update); + }, [update]); + + return { scrollRef, ...state }; +} + +function ScrollFadeOverlay({ position }: { position: "top" | "bottom" }) { + return ( +
+ ); +} diff --git a/apps/desktop/src/components/main/body/sessions/outer-header/metadata/index.tsx b/apps/desktop/src/components/main/body/sessions/outer-header/metadata/index.tsx index 0eb640357b..fc177f81aa 100644 --- a/apps/desktop/src/components/main/body/sessions/outer-header/metadata/index.tsx +++ b/apps/desktop/src/components/main/body/sessions/outer-header/metadata/index.tsx @@ -51,7 +51,7 @@ const TriggerInner = forwardRef< size="sm" className={cn([open && "bg-neutral-100"])} > - + {formatRelativeOrAbsolute(createdAt ? new Date(createdAt) : new Date())} ); diff --git a/apps/desktop/src/components/main/sidebar/devtool.tsx b/apps/desktop/src/components/main/sidebar/devtool.tsx index b1f429ee55..414a144962 100644 --- a/apps/desktop/src/components/main/sidebar/devtool.tsx +++ b/apps/desktop/src/components/main/sidebar/devtool.tsx @@ -9,8 +9,10 @@ import { type Store as MainStore, STORE_ID as STORE_ID_PERSISTED, } from "../../../store/tinybase/store/main"; +import { useTabs } from "../../../store/zustand/tabs"; import { type SeedDefinition, seeds } from "../../devtool/seed/index"; import { useTrialExpiredModal } from "../../devtool/trial-expired-modal"; +import { getLatestVersion } from "../body/changelog"; declare global { interface Window { @@ -87,9 +89,11 @@ export function DevtoolView() { function DevtoolCard({ title, children, + maxHeight, }: { title: string; children: React.ReactNode; + maxHeight?: string; }) { return (
@@ -104,7 +109,12 @@ function DevtoolCard({ {title}

-
{children}
+
+ {children} +
); } @@ -189,7 +199,7 @@ function CalendarMockCard() { function SeedCard({ onSeed }: { onSeed: (seed: SeedDefinition) => void }) { return ( - +
{seeds.map((seed) => ( +
); diff --git a/apps/web/content/changelog/1.0.0-nightly.1.mdx b/apps/web/content/changelog/1.0.0-nightly.1.mdx index 5811cfc082..0b4c33a938 100644 --- a/apps/web/content/changelog/1.0.0-nightly.1.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.1.mdx @@ -1,4 +1 @@ ---- ---- - - Initial release. diff --git a/apps/web/content/changelog/1.0.0-nightly.10.mdx b/apps/web/content/changelog/1.0.0-nightly.10.mdx index c974d8b72c..e5c03b8d56 100644 --- a/apps/web/content/changelog/1.0.0-nightly.10.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.10.mdx @@ -1,6 +1,3 @@ ---- ---- - - Add Intel macOS (x86_64) support. - Add Deno-powered extensions runtime with iframe-based isolation and TinyBase sync. - Add calendar extension. (not included yet) diff --git a/apps/web/content/changelog/1.0.0-nightly.11.mdx b/apps/web/content/changelog/1.0.0-nightly.11.mdx index 1367f02bf2..0e41663d06 100644 --- a/apps/web/content/changelog/1.0.0-nightly.11.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.11.mdx @@ -1,6 +1,3 @@ ---- ---- - - Add .deb build for Linux x86_64. - Add network availability monitoring plugin. - Add NetworkContext for network status in desktop app. diff --git a/apps/web/content/changelog/1.0.0-nightly.12.mdx b/apps/web/content/changelog/1.0.0-nightly.12.mdx index 859aa91a54..3d64b27e59 100644 --- a/apps/web/content/changelog/1.0.0-nightly.12.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.12.mdx @@ -1,6 +1,3 @@ ---- ---- - - Add Gladia STT provider with realtime and batch transcription support. - Add OpenAI STT provider with realtime and batch transcription support. - Add prompt, shortcut, template, and extensions tabs in settings. diff --git a/apps/web/content/changelog/1.0.0-nightly.13.mdx b/apps/web/content/changelog/1.0.0-nightly.13.mdx index 08c97f77a4..b4f7d82173 100644 --- a/apps/web/content/changelog/1.0.0-nightly.13.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.13.mdx @@ -1,6 +1,3 @@ ---- ---- - - Unify VAD logic with StreamingVad for better audio processing. - Fix batch audio processing bugs in listener2 plugin. - Update onboarding flow with new model selection. diff --git a/apps/web/content/changelog/1.0.0-nightly.14.mdx b/apps/web/content/changelog/1.0.0-nightly.14.mdx index 4f79b04831..f44ea0b982 100644 --- a/apps/web/content/changelog/1.0.0-nightly.14.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.14.mdx @@ -1,6 +1,3 @@ ---- ---- - - Fix Ollama CORS error by adding Origin header for requests. - Use different deeplink schema per bundle for proper app routing. - Apply clippy fixes to Rust crates (whisper-local, analytics, vvad, buffer, llama). diff --git a/apps/web/content/changelog/1.0.0-nightly.15.mdx b/apps/web/content/changelog/1.0.0-nightly.15.mdx index cf95337469..b2f6cd621c 100644 --- a/apps/web/content/changelog/1.0.0-nightly.15.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.15.mdx @@ -1,6 +1,3 @@ ---- ---- - - Implement free trial support in desktop app with new onboarding flow. - Add full Gladia STT support with code switching, partial transcripts, multi-channel audio, custom vocabulary, and speaker diarization. - Fix hooks plugin functionality and improve event handling. diff --git a/apps/web/content/changelog/1.0.0-nightly.16.mdx b/apps/web/content/changelog/1.0.0-nightly.16.mdx index 6aa53f100a..a0e9ad73f2 100644 --- a/apps/web/content/changelog/1.0.0-nightly.16.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.16.mdx @@ -1,6 +1,3 @@ ---- ---- - - Add Export Transcript menu item to session overflow menu. - Extract device-heuristic crate with improved channel mode detection for audio devices. - Remove unused calendar crates (outlook, google) and inline apple-calendar crate. diff --git a/apps/web/content/changelog/1.0.0-nightly.17.mdx b/apps/web/content/changelog/1.0.0-nightly.17.mdx index 877761bb17..16061b7523 100644 --- a/apps/web/content/changelog/1.0.0-nightly.17.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.17.mdx @@ -1,6 +1,3 @@ ---- ---- - - Add app info to MicStopped event, so that the app ignored list can also be applied to MicStopped events, consistent with MicStarted events. - Fix store data loading from disk in non-main windows (e.g., Settings), eliminating a 1-2 second delay. - Fix analytics app_version to use the APP_VERSION environment variable. diff --git a/apps/web/content/changelog/1.0.0-nightly.18.mdx b/apps/web/content/changelog/1.0.0-nightly.18.mdx index 1a0e63b1fe..1e7ee63d30 100644 --- a/apps/web/content/changelog/1.0.0-nightly.18.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.18.mdx @@ -1,6 +1,3 @@ ---- ---- - ## OTA - Extract update check functionality into a new updater2 plugin. diff --git a/apps/web/content/changelog/1.0.0-nightly.19.mdx b/apps/web/content/changelog/1.0.0-nightly.19.mdx index f5cf493556..e34abb4db5 100644 --- a/apps/web/content/changelog/1.0.0-nightly.19.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.19.mdx @@ -1,6 +1,3 @@ ---- ---- - ## Onboarding - Redesign onboarding UI. diff --git a/apps/web/content/changelog/1.0.0-nightly.2.mdx b/apps/web/content/changelog/1.0.0-nightly.2.mdx index 6e4d39443a..2ff70378dc 100644 --- a/apps/web/content/changelog/1.0.0-nightly.2.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.2.mdx @@ -1,4 +1 @@ ---- ---- - - Fix app icon padding. diff --git a/apps/web/content/changelog/1.0.0-nightly.20.mdx b/apps/web/content/changelog/1.0.0-nightly.20.mdx index abc267cd30..10b224f7d9 100644 --- a/apps/web/content/changelog/1.0.0-nightly.20.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.20.mdx @@ -1,6 +1,3 @@ ---- ---- - ## Onboarding - Auto set model and provider when Pro trial is enabled during onboarding. diff --git a/apps/web/content/changelog/1.0.0-nightly.21.mdx b/apps/web/content/changelog/1.0.0-nightly.21.mdx index 96c45d52ef..1ac69de55f 100644 --- a/apps/web/content/changelog/1.0.0-nightly.21.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.21.mdx @@ -1,6 +1,3 @@ ---- ---- - ## Notification - Fix handlers for notification events. diff --git a/apps/web/content/changelog/1.0.0-nightly.22.mdx b/apps/web/content/changelog/1.0.0-nightly.22.mdx index 490ece32c4..7734bcf51e 100644 --- a/apps/web/content/changelog/1.0.0-nightly.22.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.22.mdx @@ -1,6 +1,3 @@ ---- ---- - ## Session - Prevent closing tab during active listening. diff --git a/apps/web/content/changelog/1.0.0-nightly.23.mdx b/apps/web/content/changelog/1.0.0-nightly.23.mdx index 0da4401f46..1c1741b70c 100644 --- a/apps/web/content/changelog/1.0.0-nightly.23.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.23.mdx @@ -1,5 +1,2 @@ ---- ---- - - Remove `react-scan` that was accidentally included in the production build. - Add OTA updates installed from cache. \ No newline at end of file diff --git a/apps/web/content/changelog/1.0.0-nightly.24.mdx b/apps/web/content/changelog/1.0.0-nightly.24.mdx index 23482c6455..c54b52a017 100644 --- a/apps/web/content/changelog/1.0.0-nightly.24.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.24.mdx @@ -1,4 +1 @@ ---- ---- - - Fix OTA update check interval. diff --git a/apps/web/content/changelog/1.0.0-nightly.25.mdx b/apps/web/content/changelog/1.0.0-nightly.25.mdx index 94f899735b..b768023b63 100644 --- a/apps/web/content/changelog/1.0.0-nightly.25.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.25.mdx @@ -1,6 +1,3 @@ ---- ---- - - New onboarding experience with background music. - Add PDF export with typst-based formatting. - Fix transcript export. diff --git a/apps/web/content/changelog/1.0.0-nightly.26.mdx b/apps/web/content/changelog/1.0.0-nightly.26.mdx index 1e61605118..68a158b812 100644 --- a/apps/web/content/changelog/1.0.0-nightly.26.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.26.mdx @@ -1,6 +1,3 @@ ---- ---- - - Fix fatal error around keywords handling for Deepgram and Gladia. - Optimize tiptap json to markdown export performance by 20x with custom rust implementation. - Await beforeListeningStarted hook before starting session. diff --git a/apps/web/content/changelog/1.0.0-nightly.27.mdx b/apps/web/content/changelog/1.0.0-nightly.27.mdx index 88a745c8c8..a70fe67107 100644 --- a/apps/web/content/changelog/1.0.0-nightly.27.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.27.mdx @@ -1,6 +1,3 @@ ---- ---- - - Add calendar picker UI with permission handling. - Improve templates tab view. - Add draggable header region to error and 404 screens. diff --git a/apps/web/content/changelog/1.0.0-nightly.28.mdx b/apps/web/content/changelog/1.0.0-nightly.28.mdx index 0ea3dc3827..57cd5aebb8 100644 --- a/apps/web/content/changelog/1.0.0-nightly.28.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.28.mdx @@ -1,6 +1,3 @@ ---- ---- - - Fix onboarding freeze issue. - Separate data folder for staging environment. diff --git a/apps/web/content/changelog/1.0.0-nightly.29.mdx b/apps/web/content/changelog/1.0.0-nightly.29.mdx index c4ce1be008..d216c914c8 100644 --- a/apps/web/content/changelog/1.0.0-nightly.29.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.29.mdx @@ -1,5 +1,2 @@ ---- ---- - - Fix race condition in Windows command operations. - Refine template rendering, including proper output language instructions. diff --git a/apps/web/content/changelog/1.0.0-nightly.3.mdx b/apps/web/content/changelog/1.0.0-nightly.3.mdx index 73ae51a209..bf423c5d57 100644 --- a/apps/web/content/changelog/1.0.0-nightly.3.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.3.mdx @@ -1,4 +1 @@ ---- ---- - - Validate Tiptap document JSON before initializing editor. diff --git a/apps/web/content/changelog/1.0.0-nightly.30.mdx b/apps/web/content/changelog/1.0.0-nightly.30.mdx index d86a207893..c52d7f6b01 100644 --- a/apps/web/content/changelog/1.0.0-nightly.30.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.30.mdx @@ -1,6 +1,3 @@ ---- ---- - - Fix search results to display proper UI with highlighted matches instead of raw JSON. - Hide floating action buttons (FABs) when typing near the bottom of the editor. - Fix native menu item panic and action handling. diff --git a/apps/web/content/changelog/1.0.0-nightly.31.mdx b/apps/web/content/changelog/1.0.0-nightly.31.mdx index 5165ca48f9..1927b2dc83 100644 --- a/apps/web/content/changelog/1.0.0-nightly.31.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.31.mdx @@ -1,6 +1,3 @@ ---- ---- - - Fix file upload and batch transcription - Various refactors in audio actor system - Fix outdated navigation event from tray icon. diff --git a/apps/web/content/changelog/1.0.0-nightly.32.mdx b/apps/web/content/changelog/1.0.0-nightly.32.mdx index 4774bdf2c1..3d775cee7a 100644 --- a/apps/web/content/changelog/1.0.0-nightly.32.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.32.mdx @@ -1,6 +1,3 @@ ---- ---- - ## Search & Indexing - Replace Pagefind plugin with Tantivy-based full-text search plugin diff --git a/apps/web/content/changelog/1.0.0-nightly.4.mdx b/apps/web/content/changelog/1.0.0-nightly.4.mdx index 57967da79b..ddd81b6710 100644 --- a/apps/web/content/changelog/1.0.0-nightly.4.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.4.mdx @@ -1,6 +1,3 @@ ---- ---- - - Add Google Generative AI provider support. - Fix OpenAI and Anthropic model provider support. - Add separate window for devtool. diff --git a/apps/web/content/changelog/1.0.0-nightly.5.mdx b/apps/web/content/changelog/1.0.0-nightly.5.mdx index a77300f3d6..63940768f0 100644 --- a/apps/web/content/changelog/1.0.0-nightly.5.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.5.mdx @@ -1,6 +1,3 @@ ---- ---- - - Show only version string for OTA status. - Use 24k sample-rate in macOS to minimize resampling. - Prevent drag-and-drop by default. diff --git a/apps/web/content/changelog/1.0.0-nightly.6.mdx b/apps/web/content/changelog/1.0.0-nightly.6.mdx index 847cfdb5a6..00d8417ad0 100644 --- a/apps/web/content/changelog/1.0.0-nightly.6.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.6.mdx @@ -1,4 +1 @@ ---- ---- - - `1.0.0-nightly.5` add experimental CLI, which breaks the app in release builds. This release fixes the issue. diff --git a/apps/web/content/changelog/1.0.0-nightly.7.mdx b/apps/web/content/changelog/1.0.0-nightly.7.mdx index db3a6186b8..a3e517adb4 100644 --- a/apps/web/content/changelog/1.0.0-nightly.7.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.7.mdx @@ -1,6 +1,3 @@ ---- ---- - - Add "Show in Finder" option to overflow menu. - Fix recording issues when using headphones. (Wrong sample rate, Distorted recording) - Add CLI installer in app menu. diff --git a/apps/web/content/changelog/1.0.0-nightly.8.mdx b/apps/web/content/changelog/1.0.0-nightly.8.mdx index 15cb428ea5..8226721e20 100644 --- a/apps/web/content/changelog/1.0.0-nightly.8.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.8.mdx @@ -1,6 +1,3 @@ ---- ---- - - Fix AGC with VAD and config modification. - Add Linux implementation for app listing features and device monitoring using PulseAudio. - Add Linux headphone detection support for automatic channel mode switching. diff --git a/apps/web/content/changelog/1.0.0-nightly.9.mdx b/apps/web/content/changelog/1.0.0-nightly.9.mdx index 4d35da1edc..7c2a71ddb9 100644 --- a/apps/web/content/changelog/1.0.0-nightly.9.mdx +++ b/apps/web/content/changelog/1.0.0-nightly.9.mdx @@ -1,6 +1,3 @@ ---- ---- - - Remove memory settings from preferences. - Fix macOS audio tap. - Fix CLI --help and --version flags handling. diff --git a/apps/web/content/changelog/1.0.0.mdx b/apps/web/content/changelog/1.0.0.mdx index 3b95664998..5f6e9a49a7 100644 --- a/apps/web/content/changelog/1.0.0.mdx +++ b/apps/web/content/changelog/1.0.0.mdx @@ -1,6 +1,3 @@ ---- ---- - ![v1.0.0](/api/images/changelog/v1.0.0.jpg) We're excited to announce Hyprnote 1.0.0, our first stable release! This release consolidates all the improvements from our nightly builds into a polished, production-ready experience. diff --git a/apps/web/src/routes/_view/changelog/$slug.tsx b/apps/web/src/routes/_view/changelog/$slug.tsx index 4ff775e723..73aea8d76f 100644 --- a/apps/web/src/routes/_view/changelog/$slug.tsx +++ b/apps/web/src/routes/_view/changelog/$slug.tsx @@ -244,7 +244,7 @@ function DownloadLinksHeroMobile({ version }: { version: string }) { style={{ transform: `translateX(-${activeIndex * 100}%)` }} > {allLinks.map((link) => ( -
+