Use code previews and search helpers
Overview Use the Code dive and Code search helpers in your Moxie Docs workspace to quickly preview repository files and scan for related code while you read docs, answer questions, or review changes. These helpers open side panels with file previews or search results so you can inspect paths, languages, and snippets without leaving the page.
Before you start
- You need access to a repository connected to Moxie Docs via the GitHub App.
- Open your Moxie Docs workspace in the browser.
Open a file preview with Code dive Use this when you already know the file or path you want to inspect.
- In your workspace, look for the panel or link labeled Code dive. You’ll see it alongside docs tools such as Search, Q&A, or Changelog.
- Select Code dive to open the panel.
- Browse or paste a repository path to a file. The panel shows:
- File path
- Detected language (based on the file extension)
- File content preview (long files are truncated so they load quickly)
- Scroll the preview to skim the content. When you’re done, select Close to return to your doc view.
Tips
- If a file is very large, you’ll see only the beginning of the file. Use this to confirm you’re in the right place before opening it in GitHub.
- Language is inferred automatically, so syntax highlighting reflects the file type.
Search the codebase with Code search Use this when you don’t know the exact file but want to find references or examples.
- In your workspace, select Code search.
- Enter a term to find (for example, a function name, config key, or filename fragment).
- Select Search. The results list shows matches with:
- File path
- Detected language
- One or more text snippets around the match
- Select a result to open its preview. You’ll see a truncated view so you can quickly confirm relevance.
- To refine, adjust your search term and run Search again.
Common workflows
- From docs or Q&A answers: When a page references a file or symbol, open Code dive or Code search from the sidebar to verify details before you make any changes.
- While reviewing drift or changelog items: Use Code search to find all related references, then open previews to confirm context.
What you’ll see and what it means
- Path: The location of the file in your repository.
- Language: The file type inferred from the extension (for example, .ts, .md).
- Snippet: A short section of text around the match to help you judge relevance quickly.
- Truncated content: Large files are shortened in the preview to keep things fast. Open the file in GitHub if you need the full content.
Troubleshooting
- No results: Try a broader term or remove punctuation. If the repository was just connected, indexing may still be in progress—check again in a few minutes.
- Preview won’t load: Refresh the page. If it persists, open the file directly in GitHub from the repository.
Next steps
- Use the previews to confirm you’ve found the right code, then proceed with your documentation task (for example, updating a page or submitting feedback on an answer). Your quick checks here help keep docs accurate without context switching.
Was this page helpful?
Let us know if you found what you were looking for.