Skip to content

feat(docs): add search functionality to documentation#2690

Open
iamomm-hack wants to merge 2 commits intostellar:masterfrom
iamomm-hack:feat/docs-search
Open

feat(docs): add search functionality to documentation#2690
iamomm-hack wants to merge 2 commits intostellar:masterfrom
iamomm-hack:feat/docs-search

Conversation

@iamomm-hack
Copy link
Copy Markdown

Add Search Bar to Freighter Docs

Problem

The documentation currently lacks a search feature, making it difficult for users to quickly find relevant information.

Solution

  • Integrated local search using @easyops-cn/docusaurus-search-local
  • Added search bar to the navbar
  • Enabled keyword-based search across documentation pages

Features

  • Instant search results
  • Highlighted search terms
  • No external API required

Notes

  • Changes are limited to the docs workspace only

Copilot AI review requested due to automatic review settings April 11, 2026 08:39
@socket-security
Copy link
Copy Markdown

socket-security Bot commented Apr 11, 2026

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
High CVE: npm @isaacs/brace-expansion has Uncontrolled Resource Consumption

CVE: GHSA-7h2j-956f-4vf2 @isaacs/brace-expansion has Uncontrolled Resource Consumption (HIGH)

Affected versions: < 5.0.1

Patched version: 5.0.1

From: ?npm/shadcn@3.8.4npm/glob@12.0.0npm/@isaacs/brace-expansion@5.0.0

ℹ Read more on: This package | This alert | What is a CVE?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Remove or replace dependencies that include known high severity CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@isaacs/brace-expansion@5.0.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
High CVE: Axios is Vulnerable to Denial of Service via __proto__ Key in mergeConfig

CVE: GHSA-43fc-jf86-j433 Axios is Vulnerable to Denial of Service via proto Key in mergeConfig (HIGH)

Affected versions: >= 1.0.0 < 1.13.5; < 0.30.3

Patched version: 1.13.5

From: ?npm/soroswap-router-sdk@1.4.6npm/@stellar/typescript-wallet-sdk-km@1.9.0npm/axios@1.13.2

ℹ Read more on: This package | This alert | What is a CVE?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Remove or replace dependencies that include known high severity CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/axios@1.13.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm lunr-languages is 91.0% likely obfuscated

Confidence: 0.91

Location: Package overview

From: ?npm/@easyops-cn/docusaurus-search-local@0.55.1npm/lunr-languages@1.14.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/lunr-languages@1.14.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm lunr-languages is 95.0% likely obfuscated

Confidence: 0.95

Location: Package overview

From: ?npm/@easyops-cn/docusaurus-search-local@0.55.1npm/lunr-languages@1.14.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/lunr-languages@1.14.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm lunr-languages under MIT AND MPL-1.1

Location: Package overview

From: ?npm/@easyops-cn/docusaurus-search-local@0.55.1npm/lunr-languages@1.14.0

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/lunr-languages@1.14.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds local, client-side search to the Freighter documentation site (Docusaurus) so users can quickly find relevant pages without relying on an external search API.

Changes:

  • Added @easyops-cn/docusaurus-search-local to the docs workspace dependencies.
  • Added a navbar search item and configured the local search plugin in docusaurus.config.js.
  • Updated lockfile and the root packageManager metadata as part of the dependency change.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.

File Description
docs/package.json Adds the local search plugin dependency to the docs workspace.
docs/docusaurus.config.js Adds navbar search UI and configures the local search plugin.
package.json Updates the Yarn packageManager field to include a hash.
yarn.lock Captures the new dependency graph introduced by the search plugin.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/package.json
Comment on lines 29 to 32
"@docusaurus/core": "3.6.3",
"@docusaurus/preset-classic": "3.6.3",
"@easyops-cn/docusaurus-search-local": "^0.55.1",
"@stellar/freighter-api": "latest",
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

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

Adding @easyops-cn/docusaurus-search-local introduces a second set of @docusaurus/* packages at 3.10.0 in yarn.lock while the docs site is pinned to 3.6.3. Running multiple Docusaurus minor versions side-by-side can cause plugin/runtime incompatibilities and also bloats the install. Consider aligning versions by either upgrading docs to 3.10.0 or adding a Yarn resolution to force @docusaurus/* (and react-router deps if needed) to the same version used by docs.

Copilot uses AI. Check for mistakes.
Comment thread docs/package.json
"@docusaurus/core": "3.6.3",
"@docusaurus/preset-classic": "3.6.3",
"@easyops-cn/docusaurus-search-local": "^0.55.1",
"@stellar/freighter-api": "latest",
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

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

All other docs dependencies are pinned to exact versions, but this new dependency uses a caret range. To keep installs deterministic and avoid unexpected lockfile churn, pin @easyops-cn/docusaurus-search-local to an exact version (and manage updates intentionally).

Suggested change
"@stellar/freighter-api": "latest",
"@stellar/freighter-api": "4.1.0",

Copilot uses AI. Check for mistakes.
Comment thread docs/docusaurus.config.js
],
};

// SEARCH PLUGIN (FINAL)
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

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

The comment "SEARCH PLUGIN (FINAL)" isn’t descriptive of behavior and will likely become stale. Prefer either removing it or replacing it with a short, durable description (e.g., "Local doc search") without workflow/status wording like "FINAL".

Suggested change
// SEARCH PLUGIN (FINAL)
// Local doc search plugin

Copilot uses AI. Check for mistakes.
Comment thread package.json
Comment on lines 146 to 148
},
"packageManager": "yarn@4.10.0"
"packageManager": "yarn@4.10.0+sha512.8dd111dbb1658cf17089636e5bf490795958158755f36cb75c5a2db0bda6be4d84b95447753627f3330d1457cb6f7e8c1e466eaed959073c82be0242c2cd41e7"
}
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

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

PR description says changes are limited to the docs workspace, but this updates the root-level packageManager field. If this hash change is intentional (e.g., standardizing the Yarn binary via Corepack), it would help to note it in the PR description; otherwise consider reverting to keep the scope strictly docs-only.

Copilot uses AI. Check for mistakes.
@iamomm-hack iamomm-hack force-pushed the feat/docs-search branch 3 times, most recently from b6245f2 to 701308b Compare April 11, 2026 08:50
Copy link
Copy Markdown
Author

@iamomm-hack iamomm-hack left a comment

Choose a reason for hiding this comment

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

Cleaned up the PR to limit changes strictly to the docs workspace and removed unrelated root-level changes.

Copy link
Copy Markdown
Author

@iamomm-hack iamomm-hack left a comment

Choose a reason for hiding this comment

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

Thanks for the review!

I’ve limited the changes strictly to the docs workspace and cleaned up unrelated root-level changes.

Regarding the dependency warnings, I used @easyops-cn/docusaurus-search-local as a common approach for adding local search in Docusaurus. Happy to switch to an alternative if preferred.

@socket-security
Copy link
Copy Markdown

socket-security Bot commented Apr 11, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​easyops-cn/​docusaurus-search-local@​0.55.1971007397100

View full report

@iamomm-hack
Copy link
Copy Markdown
Author

Rebased on latest master and refreshed the lockfile to resolve merge conflicts. Checks should rerun now.

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