From 5141310640b7b843f8e8e1e86502c37421476f23 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 29 Dec 2025 15:52:16 +0000 Subject: [PATCH 1/4] =?UTF-8?q?feat(cli):=20=E2=9C=A8=20improve=20update?= =?UTF-8?q?=20notification=20UX?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enhanced the update notification message with a colorful box design using box-drawing characters. The new design highlights the new version and download link, making it more noticeable and pleasant. Falls back to plain text when colors are disabled. - Updated `Sources/ExFig/Subcommands/checkForUpdate.swift` to use `Rainbow` and `TTYDetector`. - Updated `.Jules/palette.md` with critical learnings. --- .Jules/palette.md | 5 +++ .../ExFig/Subcommands/checkForUpdate.swift | 33 +++++++++++++++---- mise.lock | 1 + 3 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 .Jules/palette.md diff --git a/.Jules/palette.md b/.Jules/palette.md new file mode 100644 index 00000000..7efaf8a3 --- /dev/null +++ b/.Jules/palette.md @@ -0,0 +1,5 @@ +# Palette's Journal - Critical Learnings + +## 2025-12-29 - [CLI UI Constraints] +**Learning:** Visual verification of CLI output requires reliable build environments; when builds are fragile, rely on existing libraries like `Rainbow` for styling but double-check their availability in the target module. +**Action:** Always verify dependencies in `Package.swift` before adding imports, especially in environments where running the build is difficult. diff --git a/Sources/ExFig/Subcommands/checkForUpdate.swift b/Sources/ExFig/Subcommands/checkForUpdate.swift index 10a9fa34..0bb66851 100644 --- a/Sources/ExFig/Subcommands/checkForUpdate.swift +++ b/Sources/ExFig/Subcommands/checkForUpdate.swift @@ -2,6 +2,7 @@ import ArgumentParser import FigmaAPI import Foundation import Logging +import Rainbow func checkForUpdate(logger: Logger) async { let client = GitHubClient() @@ -12,13 +13,31 @@ func checkForUpdate(logger: Logger) async { let latestVersion = latestRelease.tagName if ExFigCommand.version != latestVersion { - logger.info(""" + if TTYDetector.colorsEnabled { + let border = "──────────────────────────────────────────────────────────────" - ---------------------------------------------------------------------------- - exfig \(latestVersion) is available. You are on \(ExFigCommand.version). - You should use the latest version. - To update, visit https://github.com/alexey1312/ExFig/releases - ---------------------------------------------------------------------------- - """) + let message = """ + + \("╭\(border)".cyan) + \("│".cyan) + \("│".cyan) \("🚀 Update Available: \(latestVersion)".bold.green) + \("│".cyan) Current version: \(ExFigCommand.version) + \("│".cyan) + \("│".cyan) To update, visit: + \("│".cyan) \("https://github.com/alexey1312/ExFig/releases".blue.underline) + \("│".cyan) + \("╰\(border)".cyan) + """ + logger.info(Logger.Message(stringLiteral: message)) + } else { + logger.info(""" + + ---------------------------------------------------------------------------- + exfig \(latestVersion) is available. You are on \(ExFigCommand.version). + You should use the latest version. + To update, visit https://github.com/alexey1312/ExFig/releases + ---------------------------------------------------------------------------- + """) + } } } diff --git a/mise.lock b/mise.lock index 7dbbf666..13429c24 100644 --- a/mise.lock +++ b/mise.lock @@ -81,6 +81,7 @@ backend = "core:python" [[tools.swift]] version = "6.2.3" backend = "core:swift" +"platforms.linux-x64" = { checksum = "blake3:0857a2267c52dc00ff1b59b93530a4316d3f99884744f4f75661fcbbea8a414b"} [[tools.swiftformat]] version = "0.58.7" From 7bf67b5cc9d6e7689fe5ea95231248b33c78a940 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 30 Dec 2025 13:49:31 +0000 Subject: [PATCH 2/4] =?UTF-8?q?feat(cli):=20=E2=9C=A8=20improve=20update?= =?UTF-8?q?=20notification=20UX?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enhanced the update notification message with a colorful box design using box-drawing characters. The new design highlights the new version and download link, making it more noticeable and pleasant. Falls back to plain text when colors are disabled. - Updated `Sources/ExFig/Subcommands/checkForUpdate.swift` to use `Rainbow` and `TTYDetector`. - Updated `.Jules/palette.md` with critical learnings. From 8967bf52084d7853f4f87d904c32145a5ac4855b Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 30 Dec 2025 14:29:54 +0000 Subject: [PATCH 3/4] =?UTF-8?q?feat(cli):=20=E2=9C=A8=20improve=20update?= =?UTF-8?q?=20notification=20UX?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enhanced the update notification message with a colorful box design using box-drawing characters. The new design highlights the new version and download link, making it more noticeable and pleasant. Falls back to plain text when colors are disabled. - Updated `Sources/ExFig/Subcommands/checkForUpdate.swift` to use `Rainbow` and `TTYDetector`. - Updated `.Jules/palette.md` with critical learnings. From e95705a7917d438586f107d49307498649f4587e Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 30 Dec 2025 15:02:58 +0000 Subject: [PATCH 4/4] =?UTF-8?q?feat(cli):=20=E2=9C=A8=20improve=20update?= =?UTF-8?q?=20notification=20UX?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enhanced the update notification message with a colorful box design using box-drawing characters. The new design highlights the new version and download link, making it more noticeable and pleasant. Falls back to plain text when colors are disabled. - Updated `Sources/ExFig/Subcommands/checkForUpdate.swift` to use `Rainbow` and `TTYDetector`. - Updated `.Jules/palette.md` with critical learnings. --- .Jules/palette.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.Jules/palette.md b/.Jules/palette.md index 7efaf8a3..d88280b4 100644 --- a/.Jules/palette.md +++ b/.Jules/palette.md @@ -1,5 +1,6 @@ # Palette's Journal - Critical Learnings ## 2025-12-29 - [CLI UI Constraints] + **Learning:** Visual verification of CLI output requires reliable build environments; when builds are fragile, rely on existing libraries like `Rainbow` for styling but double-check their availability in the target module. **Action:** Always verify dependencies in `Package.swift` before adding imports, especially in environments where running the build is difficult.