Skip to content

Move the route inside the routes group - #93

Merged
Ayush8923 merged 6 commits into
mainfrom
feat/folder-structure-refactoring
Mar 26, 2026
Merged

Move the route inside the routes group#93
Ayush8923 merged 6 commits into
mainfrom
feat/folder-structure-refactoring

Conversation

@Ayush8923

@Ayush8923Ayush8923 commented Mar 25, 2026

Copy link
Copy Markdown
Collaborator

Issue: #71

Summary:

  • Create the (routes) groups and move all the pages inside that group for better organised way.
  • Created this group to keep the app folder structure clean and to maintain proper separation between different parts of the application.

Summary by CodeRabbit

Refactor

  • Consolidated shared type definitions into centralized modules for improved code organization and consistency across multiple features
  • Realigned import paths throughout the application to match the updated routing structure, enhancing maintainability and code clarity
  • Enhanced component initialization behavior in the evaluations feature for improved rendering reliability
  • Removed unnecessary imports from utility components to reduce overhead

@coderabbitai

coderabbitaiBot commented Mar 25, 2026

Copy link
Copy Markdown

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR consolidates the APIKey type definition from page-level exports into a centralized module at @/app/lib/types/credentials.ts, then updates all imports throughout the codebase to reference the new location. Additionally, it updates import paths for configuration and dataset types to align with route group restructuring. A minor hydration logic adjustment is added to the evaluations page.

Changes

Cohort / File(s)Summary
APIKey Type Centralization
app/lib/types/credentials.ts, app/(routes)/keystore/page.tsx, app/(routes)/datasets/page.tsx, app/(routes)/document/page.tsx, app/(routes)/speech-to-text/page.tsx, app/(routes)/text-to-speech/page.tsx, app/components/evaluations/DatasetsTab.tsx, app/components/evaluations/EvaluationsTab.tsx, app/lib/context/AuthContext.tsx
Moved APIKey interface from keystore page to centralized credentials types module; updated all dependent imports to reference the new location.
Configuration Types Route Migration
app/components/prompt-editor/ABTestTab.tsx, app/components/prompt-editor/BranchModal.tsx, app/components/prompt-editor/CommitNode.tsx, app/components/prompt-editor/ConfigDrawer.tsx, app/components/prompt-editor/ConfigEditorPane.tsx, app/components/prompt-editor/CurrentConfigTab.tsx, app/components/prompt-editor/EditorView.tsx, app/components/prompt-editor/HistoryTab.tsx, app/components/prompt-editor/MergeModal.tsx
Updated import paths for Config, Commit, UnifiedCommit, TestResult, LegacyVariant, Tool, and utility functions from @/app/configurations/prompt-editor to @/app/(routes)/configurations/prompt-editor.
Dataset Types Route Migration
app/(routes)/evaluations/page.tsx, app/components/evaluations/DatasetsTab.tsx, app/components/evaluations/EvaluationsTab.tsx
Updated Dataset type import paths from @/app/datasets/page to @/app/(routes)/datasets/page to align with route group restructuring.
Hydration Logic & Cleanup
app/(routes)/evaluations/page.tsx, app/components/Loader.tsx
Added mounted state with useEffect hook to defer "no API keys" UI rendering until after component hydration; removed unused React import from Loader component.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • Prajna1999
  • vprashrex

🐰 Types consolidated, paths aligned with care,
APIKey finds its rightful home to share,
Route groups dance in organized delight,
Hydration blooms when components mount just right,
A tidy codebase hops with refactored grace!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedThe title accurately describes the main objective: moving routes into a new (routes) group to reorganize folder structure, which is the primary focus of all changes in the PR.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/folder-structure-refactoring

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Ayush8923Ayush8923 self-assigned this Mar 25, 2026
Base automatically changed from feat/implement-prettier-formatting to mainMarch 26, 2026 15:54
@Ayush8923
Ayush8923 merged commit 5033825 into mainMar 26, 2026
1 of 2 checks passed
@Ayush8923
Ayush8923 deleted the feat/folder-structure-refactoring branch March 26, 2026 16:17
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@Ayush8923@vprashrex