Skip to content

refactor: add reusable extensions core plumbing#101

Open
JSRRosenbaum wants to merge 3 commits intoafar1:mainfrom
JSRRosenbaum:feat/extensions-core
Open

refactor: add reusable extensions core plumbing#101
JSRRosenbaum wants to merge 3 commits intoafar1:mainfrom
JSRRosenbaum:feat/extensions-core

Conversation

@JSRRosenbaum
Copy link
Copy Markdown

@JSRRosenbaum JSRRosenbaum commented Apr 16, 2026

Summary

  • add the source-agnostic plumbing needed for extension branches to layer HN / GitHub Stars / Reddit / Web on top of current FT
  • keep this branch limited to reusable core pieces only

What changed

  • add reusable Firefox profile and cookie discovery improvements
  • add reusable status rendering helpers
  • add reusable namespace/path helpers
  • add classify --limit support and portable Firefox config test coverage

Key commits

  • 9e0b3f5 feat: add classify limit and portable firefox config test
  • f809793 refactor: improve shared firefox profile discovery
  • e8f60b6 refactor: add reusable core status and path helpers

Verification

  • npx tsx --test tests/config.test.ts tests/engine.test.ts tests/firefox-cookies.test.ts tests/firefox-profile-detection.test.ts tests/namespace-helpers.test.ts
  • npm run build

Notes

  • this is the base branch for the multi-source extension stack
  • no HN / stars / reddit / web feature code lives here directly

@JSRRosenbaum
Copy link
Copy Markdown
Author

JSRRosenbaum commented Apr 16, 2026

Posting context for reviewers:

This PR is the base of a larger stacked multi-source FT extension series.

Please review this PR as source-agnostic core plumbing only:

  • shared Firefox profile/cookie discovery improvements
  • shared status rendering helpers
  • shared namespace/path helpers
  • classify --limit support and portable Firefox config coverage

The dependent feature layers currently live as stacked PRs in my fork because I don’t have push rights to create the intermediate base branches on upstream:

So for upstream review, this PR should be treated as the base branch for that stack.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e8f60b6. Configure here.

Comment thread src/status-render.ts
}
}

return `\n${chunks.join('\n')}`;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Leading newline and padding break formatBookmarkStatus output

High Severity

renderStatusSections unconditionally prepends \n to its output, and formatStatusLine pads labels to 14 characters. This changes the output of formatBookmarkStatus from starting with "Bookmarks" to starting with "\nBookmarks", and from "bookmarks: 99" to "bookmarks: 99" (extra padding). The existing test in bookmarks-service.test.ts asserts assert.match(text, /^Bookmarks/) and assert.match(text, /bookmarks: 99/), both of which will now fail. The ft status CLI output also gets an unexpected leading blank line.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e8f60b6. Configure here.

Comment thread src/firefox-cookies.ts
return {
cookieHeader: `ct0=${ct0}; auth_token=${authToken}`,
csrfToken: ct0,
};
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cookie validation and trimming removed from Firefox path

Medium Severity

The refactored extractFirefoxXCookies no longer trims or validates cookie values against the printable-ASCII range (/^[\x21-\x7E]+$/). The Chrome path still calls sanitizeCookieValue for this purpose. Cookie values with leading/trailing whitespace or non-printable characters will now be embedded directly into the cookieHeader, potentially causing malformed HTTP headers or silent auth failures.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e8f60b6. Configure here.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants