Skip to content

Update parse-logs extension - #32765

Merged
raycastbot merged 5 commits into
raycast:mainfrom
NormCopeland:ext/parse-logs
Nov 20, 2026
Merged

raycastbot merged 5 commits into
raycast:mainfrom
NormCopeland:ext/parse-logs

Conversation

@NormCopeland

@NormCopeland NormCopeland commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Description

This update adds regular expression search and better handling of large logs to Parse Logs, fixes several bugs (including one where a run could parse the previous run's results instead of the newest log), and gives the extension a new icon.

New

  • Regex search: match lines with a regular expression as well as plain text, with an option for case-sensitive matching. An invalid pattern is flagged on the search field.
  • Line numbers: an option to prefix each saved line with its line number in the original log.
  • Log file picker: a dropdown of the folder's log files, newest first, showing each file's age and size. Any other file can still be chosen with the file picker.
  • Output Folder preference (optional): choose where results are saved. By default they still go next to the log file.
  • New icon.

Fixes

  • Results are saved as {name}_parsed_{timestamp}.log next to the log, so with no file chosen, the next run picked the previous run's results as "the newest log". Files with _parsed_ in the name are no longer offered as logs.
  • Logs were read into memory in full and every match was rendered in the preview, which could stall Raycast on large files. Logs are now read line by line, and the preview shows the first 500 matches; the saved file always has every match.
  • Windows line endings left a stray \r at the end of every saved line.
  • A log line containing ``` broke the preview. The preview now uses a code fence longer than any backtick run in the content.
  • Saving failed when the log's folder couldn't be written to (for example /var/log). Results now go to ~/Downloads in that case, and the result view says so.
  • Folders named like something.log and broken symlinks were treated as log files. Folders and broken links are now skipped, and symlinked logs such as latest.log are followed.
  • When nothing matched, an error was shown. There's now a clear "No matches" message with the number of lines scanned, and no file is created.

Cleanup

  • The single command file is split into the form plus two small modules: src/lib/log-files.ts (finding log files) and src/lib/parse.ts (matching and writing).
  • Uses Raycast's built-in copy actions and the generated preference types.
  • Removed the "Back to Search" action (Esc does the same) and the "Open Folder" link, which built the folder path with a string replace that could produce the wrong path. "Show in Finder" covers it.
  • All existing keyboard shortcuts are unchanged. README and CHANGELOG updated.

Testing

  • Tested in Raycast with a development build.
  • Scripted checks of the file listing and parser against real files: newest-first ordering; skipping _parsed_ output, folders, broken symlinks and other extensions; following symlinks; plain text, case-sensitive and regex matching; line numbers; CRLF input; no-match runs writing no file; the backtick fence; a 35 MB log with 100,000 matches (streamed in about 0.1 s, preview capped at 500, every match in the saved file); the Downloads fallback for an unwritable folder; and a custom output folder.
  • npm run build and ray lint pass.

Screencast

Checklist

- [Model Context Protocol Registry] Add CodeTrendy (raycast#32685)
- [Model Context Protocol Registry] Add VOMO (raycast#32680)
- Better Uptime: Windows support and API update (raycast#32754)
- Update punch-clock extension (raycast#31312)
- [Model Context Protocol Registry] Add CSolar Energia (raycast#32675)
- [Prayer Times] Prayer statuses, calendar and Arabic names (raycast#32744)
- [Model Context Protocol Registry] Add Candor Finance MCP server (raycast#32671)
- Update CODEOWNERs (c58bcf1)
- Add Prayer Times extension (raycast#32165)
- Update CODEOWNERs (125c7a8)
- Add bose-noise-cancelling extension (raycast#32028)
- [Model Context Protocol Registry] Add TechFabric MCP server (raycast#32663)
- [Model Context Protocol Registry] Add MCP Checkup MCP server (raycast#32659)
- Update CODEOWNERs (b1cfbd7)
- Add subnets extension (raycast#32011)
- Update CODEOWNERs (2cb8a63)
- Add dev-essentials extension (raycast#31905)
- Update CODEOWNERs (adf7a95)
- Add Fotcast extension (raycast#31030)
- Update fip extension (raycast#32651)
- Update Game Scout: Fix Top Deals, improve chart loading and upgrade dependencies (raycast#32734)
- Update CODEOWNERs (2af4ae6)
- Browser Bookmarks: add support for the Search browser (raycast#32730)
- [Downloads Manager] Add Rename action (raycast#32709)
- [7TV Emotes Search] Add grid size preference and Grid Size submenu (raycast#32586)
- Update firefox-tabs extension: fix typing lag with many tabs (raycast#32702)
- fix(localsend): accept self-signed certificates for HTTPS device connections (raycast#32705)
- Update CODEOWNERs (545cf5f)
- [FSearch] Remove trashed results immediately (raycast#32205)
- Update CODEOWNERs (3bd8d0a)
- Update otty extension (raycast#32699)
- Done Bear: Sign in through auth.donebear.com (raycast#32707)
- Update CODEOWNERs (87b957b)
- [Google Chrome Profiles] Hide selected profiles (raycast#32545)
- Add Shopify Speed Check MCP server (raycast#32620)
- Update system monitor extension (raycast#32706)
- [Zotero] Report why a reference export failed instead of claiming success (raycast#32171)
- Update CODEOWNERs (55243b8)
- [Linear] Fix issue template description prefill (raycast#32684)
- [Karakeep] Fix screenshot previews blank on self-hosted v0.33.x (raycast#32596)
- Update Roblox Developer Tools: add Robux Earned (raycast#32674)
- feat(parse-logs): regex search, large file support, new icon and fixes
@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: parse-logs Issues related to the parse-logs extension platform: macOS OP is author The OP of the PR is the author of the extension labels Oct 25, 2026
@raycastbot

raycastbot commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Thank you for your contribution! 🎉

🔔 @NormCopeland you might want to have a look.

You can use this guide to learn how to check out the Pull Request locally in order to test it.

📋 Quick checkout commands
BRANCH="ext/parse-logs"
FORK_URL="https://github.com/NormCopeland/raycast-extensions.git"
EXTENSION_NAME="parse-logs"
REPO_NAME="raycast-extensions"

git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run dev

We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 15 business days.

@NormCopeland
NormCopeland marked this pull request as ready for review October 25, 2026 17:21
@greptile-apps

greptile-apps Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] No outstanding issues were found in this follow-up review.

Summary

Parse Logs adds regex search, a log picker, line numbers, and streamed output with a capped preview.

  • Log searches can match patterns and keep the original line numbers.
  • The log form lists recent files and lets users choose another source.
  • Large logs produce complete result files and a bounded preview.
  • Results can go to a chosen folder and stay easy to find.
  • Parse Logs refreshes its Raycast packages without changing the command's behavior.

Reviews (5) · Last reviewed commit: "Update CHANGELOG.md and optimise images" · Reviewed by Greptile

Comment thread extensions/parse-logs/src/lib/parse.ts Resolved
Comment thread extensions/parse-logs/src/lib/parse.ts Resolved
@0xdhrv 0xdhrv self-assigned this Oct 26, 2026

@0xdhrv 0xdhrv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hey @NormCopeland 👋

Thanks for your contribution 🔥 This is a thorough update. The previous run's results no longer get picked as "the newest log", large logs are streamed instead of read into memory, and the longer code fence for lines with backticks is a nice touch.

Here's everything I found in this pass:

Blocking

  • Please add "platforms": ["macOS"] to package.json. Every extension needs it, and this one relies on macOS paths and Finder.
  • The screenshots in metadata/ still show the old UI. They have the "Select Specific File" and "Default File" form (with a _parsed_ file picked as the default, which is the bug this PR fixes), the "Filtered Log Content" heading and the "Open Folder" link, which is now removed. Please replace them with 2–3 captures of the new form (match mode, log file dropdown) and the new result view. Please use Window Capture: the current ones are not at the Window Capture position (the window runs from x 249 to about 1821 and starts at y 130).

As mentioned in our docs here ↗

  • Please address or reply to the open Greptile threads, especially the backpressure one. In src/lib/parse.ts, parseLogFile ignores the return value of output.write(...). A large log where almost every line matches can then buffer the whole output in memory before it's flushed, which undoes the streaming. Waiting for drain when write returns false fixes it, or you could use stream/promises pipeline with a transform.

Optional

  • package.json has no categories. Adding ["Developer Tools", "Productivity"] would help people find it in the Store.
  • In parse.ts, when the first matching line is longer than PREVIEW_CHAR_LIMIT, the preview ends up empty ("Showing the first 0 of N"). Truncating that line instead of skipping it would still give something to look at.
  • The log file dropdown is only loaded once. A "Reload Log Files" action that calls revalidate from usePromise would pick up logs created while the form is open.
  • Consider showFailureToast from @raycast/utils for the failure toasts in src/parse-log-file.tsx:86 and :242. The empty file case at :86 could also be a field error on the dropdown.
  • "Copy File Contents" reads the whole output file into memory. For very large results you could warn above a size limit, or point to "Copy File" instead.
  • Optionally bump @raycast/api and @raycast/utils to the latest versions.

Feel free to reach me here or on Slack if anything is unclear.

@0xdhrv
0xdhrv marked this pull request as draft October 26, 2026 06:11
@0xdhrv
0xdhrv marked this pull request as ready for review November 20, 2026 01:59
- Shorten long lines in previews while preserving full output
- Limit clipboard text copying to 10 MB and direct users to Copy File
- Add log list reload and improve file selection error handling
- Update extension dependencies, metadata, and documentation
- Replace manual query error state with `useForm` validation.
- Initialize the search field from the default query preference.
- Move file actions after copy and navigation actions in the panel.

@0xdhrv 0xdhrv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me, approved 🔥

@raycastbot
raycastbot merged commit 09b2ca5 into raycast:main Nov 20, 2026
3 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

@raycastbot

Copy link
Copy Markdown
Collaborator

🎉 🎉 🎉

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extension fix / improvement Label for PRs with extension's fix improvements extension: parse-logs Issues related to the parse-logs extension OP is author The OP of the PR is the author of the extension platform: macOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants