-
-
Notifications
You must be signed in to change notification settings - Fork 5
Reorganize data services #2088
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reorganize data services #2088
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughWalkthroughReworks module resolution by adding a Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Areas requiring extra attention:
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
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. Comment |
4fa8211 to
b1bdc84
Compare
C# Unit Tests130 tests 130 ✅ 19s ⏱️ Results for commit cc7a049. ♻️ This comment has been updated with latest results. |
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
b1bdc84 to
a2e0ee6
Compare
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (69)
frontend/viewer/.storybook/decorators/FWLiteDecorator.svelte(2 hunks)frontend/viewer/src/DotnetProjectView.svelte(1 hunks)frontend/viewer/src/TestProjectView.svelte(1 hunks)frontend/viewer/src/WebComponent.svelte(1 hunks)frontend/viewer/src/home/HomeView.svelte(1 hunks)frontend/viewer/src/lib/DialogsProvider.svelte(1 hunks)frontend/viewer/src/lib/activity/ActivityItemChangePreview.svelte(1 hunks)frontend/viewer/src/lib/activity/ActivityView.svelte(1 hunks)frontend/viewer/src/lib/components/OpenInFieldWorksButton.svelte(1 hunks)frontend/viewer/src/lib/components/dictionary/DictionaryEntry.svelte(1 hunks)frontend/viewer/src/lib/components/dictionary/Headwords.svelte(1 hunks)frontend/viewer/src/lib/components/field-editors/audio-input.svelte(2 hunks)frontend/viewer/src/lib/components/field-editors/multi-ws-input.svelte(1 hunks)frontend/viewer/src/lib/components/field-editors/rich-multi-ws-input.svelte(1 hunks)frontend/viewer/src/lib/entry-editor/NewEntryDialog.svelte(1 hunks)frontend/viewer/src/lib/entry-editor/field-editors/ComplexFormComponents.svelte(1 hunks)frontend/viewer/src/lib/entry-editor/field-editors/ComplexForms.svelte(1 hunks)frontend/viewer/src/lib/entry-editor/object-editors/EntryEditor.svelte(1 hunks)frontend/viewer/src/lib/entry-editor/object-editors/EntryEditorPrimitive.svelte(1 hunks)frontend/viewer/src/lib/entry-editor/object-editors/ExampleEditorPrimitive.svelte(1 hunks)frontend/viewer/src/lib/entry-editor/object-editors/SenseEditorPrimitive.svelte(1 hunks)frontend/viewer/src/lib/layout/DevToolsDialog.svelte(1 hunks)frontend/viewer/src/lib/sandbox/EditorSandbox.svelte(1 hunks)frontend/viewer/src/lib/sandbox/Sandbox.svelte(3 hunks)frontend/viewer/src/lib/services/dialogs-service.ts(1 hunks)frontend/viewer/src/lib/services/event-bus.ts(1 hunks)frontend/viewer/src/lib/services/feature-service.ts(1 hunks)frontend/viewer/src/lib/services/history-service.ts(1 hunks)frontend/viewer/src/lib/services/save-event-service.svelte.ts(1 hunks)frontend/viewer/src/lib/services/service-provider.ts(1 hunks)frontend/viewer/src/lib/services/sync-status-service.ts(1 hunks)frontend/viewer/src/lib/views/OverrideFields.svelte(1 hunks)frontend/viewer/src/lib/writing-system/WritingSystemDialog.svelte(1 hunks)frontend/viewer/src/project/ProjectDropdown.svelte(1 hunks)frontend/viewer/src/project/ProjectSidebar.svelte(2 hunks)frontend/viewer/src/project/SidebarPrimaryAction.svelte(1 hunks)frontend/viewer/src/project/SyncDialog.svelte(1 hunks)frontend/viewer/src/project/browse/BrowseView.svelte(1 hunks)frontend/viewer/src/project/browse/EntriesList.svelte(1 hunks)frontend/viewer/src/project/browse/EntryMenu.svelte(2 hunks)frontend/viewer/src/project/browse/EntryRow.svelte(1 hunks)frontend/viewer/src/project/browse/EntryView.svelte(2 hunks)frontend/viewer/src/project/browse/SearchFilter.svelte(1 hunks)frontend/viewer/src/project/browse/SenseRow.svelte(1 hunks)frontend/viewer/src/project/browse/filter/FieldSelect.svelte(1 hunks)frontend/viewer/src/project/browse/filter/PartOfSpeechSelect.svelte(1 hunks)frontend/viewer/src/project/browse/filter/SemanticDomainSelect.svelte(2 hunks)frontend/viewer/src/project/browse/filter/WsSelect.svelte(1 hunks)frontend/viewer/src/project/data/complex-form-types.ts(1 hunks)frontend/viewer/src/project/data/index.ts(1 hunks)frontend/viewer/src/project/data/parts-of-speech.svelte.ts(1 hunks)frontend/viewer/src/project/data/project-stats.ts(1 hunks)frontend/viewer/src/project/data/publications.svelte.ts(1 hunks)frontend/viewer/src/project/data/semantic-domains.ts(1 hunks)frontend/viewer/src/project/data/writing-system-service.svelte.ts(1 hunks)frontend/viewer/src/project/demo/in-memory-demo-api.ts(3 hunks)frontend/viewer/src/project/tasks/ReviewList.svelte(1 hunks)frontend/viewer/src/project/tasks/SubjectPopup.svelte(1 hunks)frontend/viewer/src/project/tasks/tasks-service.ts(1 hunks)frontend/viewer/src/stories/editor/fields/1_overview.stories.svelte(1 hunks)frontend/viewer/src/stories/editor/fields/multi-ws-input.stories.svelte(1 hunks)frontend/viewer/src/stories/editor/fields/rich-multi-ws-input.stories.svelte(1 hunks)frontend/viewer/src/stories/editor/fields/rich-ws-input.stories.svelte(1 hunks)frontend/viewer/src/stories/editor/fields/ws-input.stories.svelte(1 hunks)frontend/viewer/src/stories/editor/misc/entry-picker.stories.svelte(1 hunks)frontend/viewer/src/stories/editor/stomping/stomp-safe-lcm-rich-text-editor.stories.svelte(1 hunks)frontend/viewer/tsconfig.json(1 hunks)frontend/viewer/vite.config.ts(1 hunks)frontend/viewer/vitest.config.ts(3 hunks)
🧰 Additional context used
🧠 Learnings (14)
📓 Common learnings
Learnt from: imnasnainaec
Repo: sillsdev/languageforge-lexbox PR: 1867
File: platform.bible-extension/src/main.ts:239-246
Timestamp: 2025-07-31T19:10:41.178Z
Learning: In the sillsdev/languageforge-lexbox repository, user imnasnainaec prefers to defer code improvements when there are related TODO comments indicating planned refactoring work, choosing to bundle related changes together rather than making incremental improvements that would need to be modified again during the larger refactoring.
📚 Learning: 2025-03-06T03:30:17.687Z
Learnt from: hahn-kev
Repo: sillsdev/languageforge-lexbox PR: 1522
File: frontend/viewer/src/lib/services/service-provider.ts:41-48
Timestamp: 2025-03-06T03:30:17.687Z
Learning: In the LexboxServiceProvider class, the default implementation of `nextEventAsync()` for the JsEventListener service intentionally returns an unresolved Promise (`new Promise<IFwEvent>(() => {})`) rather than a resolved one. This is a deliberate design choice related to event handling.
Applied to files:
frontend/viewer/src/lib/services/service-provider.ts
📚 Learning: 2025-07-31T16:00:49.635Z
Learnt from: imnasnainaec
Repo: sillsdev/languageforge-lexbox PR: 1867
File: platform.bible-extension/src/types/fw-lite-extension.d.ts:4-22
Timestamp: 2025-07-31T16:00:49.635Z
Learning: In the sillsdev/languageforge-lexbox repository, the platform.bible-extension is intentionally tightly coupled with the frontend's dotnet-types. The relative imports from `../../../frontend/viewer/src/lib/dotnet-types/index.js` in the extension's type declarations are by design, not a maintainability issue that needs to be addressed.
Applied to files:
frontend/viewer/src/stories/editor/fields/1_overview.stories.sveltefrontend/viewer/src/project/data/index.tsfrontend/viewer/src/project/data/parts-of-speech.svelte.tsfrontend/viewer/src/lib/entry-editor/object-editors/SenseEditorPrimitive.sveltefrontend/viewer/src/lib/services/feature-service.tsfrontend/viewer/src/lib/entry-editor/object-editors/ExampleEditorPrimitive.sveltefrontend/viewer/src/WebComponent.sveltefrontend/viewer/src/DotnetProjectView.sveltefrontend/viewer/src/project/tasks/tasks-service.tsfrontend/viewer/src/project/browse/filter/PartOfSpeechSelect.sveltefrontend/viewer/src/lib/components/dictionary/DictionaryEntry.sveltefrontend/viewer/src/project/browse/EntryRow.sveltefrontend/viewer/src/project/data/writing-system-service.svelte.tsfrontend/viewer/src/project/browse/EntryView.sveltefrontend/viewer/src/stories/editor/fields/rich-ws-input.stories.sveltefrontend/viewer/src/project/browse/filter/SemanticDomainSelect.sveltefrontend/viewer/src/stories/editor/fields/ws-input.stories.sveltefrontend/viewer/src/lib/components/dictionary/Headwords.svelte
📚 Learning: 2025-06-18T05:13:00.591Z
Learnt from: hahn-kev
Repo: sillsdev/languageforge-lexbox PR: 1757
File: frontend/viewer/src/lib/components/field-editors/multi-select.svelte:130-136
Timestamp: 2025-06-18T05:13:00.591Z
Learning: In frontend/viewer/src/lib/components/field-editors/multi-select.svelte, the computeCommandScore function from 'bits-ui' handles empty filter strings appropriately and does not hide all options when the filter is empty, contrary to initial analysis assumptions.
Applied to files:
frontend/viewer/src/stories/editor/fields/1_overview.stories.sveltefrontend/viewer/src/lib/components/field-editors/rich-multi-ws-input.sveltefrontend/viewer/src/lib/components/field-editors/multi-ws-input.sveltefrontend/viewer/src/lib/entry-editor/field-editors/ComplexFormComponents.sveltefrontend/viewer/src/project/browse/filter/SemanticDomainSelect.sveltefrontend/viewer/src/project/browse/filter/WsSelect.sveltefrontend/viewer/src/project/browse/SearchFilter.sveltefrontend/viewer/src/project/browse/filter/FieldSelect.svelte
📚 Learning: 2025-08-14T12:50:25.135Z
Learnt from: myieye
Repo: sillsdev/languageforge-lexbox PR: 1906
File: frontend/viewer/src/lib/components/ui/dialog-shared/dialog-shared-root.svelte:3-3
Timestamp: 2025-08-14T12:50:25.135Z
Learning: In the dialog-shared-root.svelte component, the module-level `openDialogs` state is intentionally shared across all component instances to coordinate dialog stacking and overlay behavior across the entire application. This enables proper z-index management where newer dialogs appear on top and only the bottom dialog shows its overlay.
Applied to files:
frontend/viewer/src/lib/DialogsProvider.sveltefrontend/viewer/src/project/SyncDialog.sveltefrontend/viewer/src/project/browse/EntryMenu.sveltefrontend/viewer/src/lib/layout/DevToolsDialog.sveltefrontend/viewer/src/project/ProjectSidebar.sveltefrontend/viewer/src/lib/entry-editor/object-editors/EntryEditor.sveltefrontend/viewer/src/lib/sandbox/Sandbox.svelte
📚 Learning: 2025-07-30T04:53:41.702Z
Learnt from: rmunn
Repo: sillsdev/languageforge-lexbox PR: 1844
File: frontend/viewer/src/lib/entry-editor/ItemListItem.svelte:26-37
Timestamp: 2025-07-30T04:53:41.702Z
Learning: In frontend/viewer/src/lib/entry-editor/ItemListItem.svelte, the TODO comments for unused props `index` and `actions` are intentional reminders for future work to be completed in a separate PR, not issues to be resolved immediately. These represent planned functionality that will be implemented later.
Applied to files:
frontend/viewer/src/project/tasks/ReviewList.sveltefrontend/viewer/src/lib/components/field-editors/audio-input.sveltefrontend/viewer/src/lib/entry-editor/NewEntryDialog.sveltefrontend/viewer/src/lib/entry-editor/object-editors/SenseEditorPrimitive.sveltefrontend/viewer/src/lib/entry-editor/object-editors/ExampleEditorPrimitive.sveltefrontend/viewer/src/lib/entry-editor/field-editors/ComplexFormComponents.sveltefrontend/viewer/src/project/browse/EntryRow.sveltefrontend/viewer/src/project/browse/EntryView.sveltefrontend/viewer/src/project/tasks/SubjectPopup.sveltefrontend/viewer/src/project/browse/EntriesList.sveltefrontend/viewer/src/lib/entry-editor/object-editors/EntryEditor.sveltefrontend/viewer/src/project/browse/SenseRow.sveltefrontend/viewer/src/lib/entry-editor/field-editors/ComplexForms.sveltefrontend/viewer/src/lib/entry-editor/object-editors/EntryEditorPrimitive.sveltefrontend/viewer/src/lib/sandbox/Sandbox.svelte
📚 Learning: 2025-05-27T06:18:33.852Z
Learnt from: hahn-kev
Repo: sillsdev/languageforge-lexbox PR: 1710
File: frontend/viewer/src/project/browse/BrowseView.svelte:17-19
Timestamp: 2025-05-27T06:18:33.852Z
Learning: The NewEntryButton component in frontend/viewer/src/project/NewEntryButton.svelte already internally checks features.write permission and conditionally renders based on write access, so external disabled props are not needed.
Applied to files:
frontend/viewer/src/stories/editor/misc/entry-picker.stories.sveltefrontend/viewer/src/lib/entry-editor/NewEntryDialog.sveltefrontend/viewer/src/project/browse/EntryMenu.sveltefrontend/viewer/src/lib/layout/DevToolsDialog.sveltefrontend/viewer/src/lib/entry-editor/field-editors/ComplexFormComponents.sveltefrontend/viewer/src/project/browse/EntryView.sveltefrontend/viewer/src/lib/components/OpenInFieldWorksButton.sveltefrontend/viewer/src/project/browse/SearchFilter.sveltefrontend/viewer/src/lib/services/dialogs-service.tsfrontend/viewer/src/lib/entry-editor/object-editors/EntryEditor.sveltefrontend/viewer/src/lib/components/dictionary/Headwords.sveltefrontend/viewer/src/lib/entry-editor/field-editors/ComplexForms.svelte
📚 Learning: 2025-07-22T09:19:37.386Z
Learnt from: rmunn
Repo: sillsdev/languageforge-lexbox PR: 1836
File: frontend/viewer/src/lib/components/audio/AudioDialog.svelte:25-25
Timestamp: 2025-07-22T09:19:37.386Z
Learning: In the sillsdev/languageforge-lexbox project, when file size limits or other constants need to be shared between C# backend and TypeScript frontend code, prefer exposing them through Reinforced.Typings type generation rather than hardcoding the values separately. This ensures consistency and prevents discrepancies when values change.
Applied to files:
frontend/viewer/src/lib/entry-editor/object-editors/SenseEditorPrimitive.sveltefrontend/viewer/src/lib/services/feature-service.tsfrontend/viewer/src/project/tasks/tasks-service.tsfrontend/viewer/src/project/browse/filter/PartOfSpeechSelect.sveltefrontend/viewer/src/lib/components/dictionary/DictionaryEntry.sveltefrontend/viewer/src/project/browse/EntryRow.sveltefrontend/viewer/src/project/demo/in-memory-demo-api.tsfrontend/viewer/src/project/browse/filter/SemanticDomainSelect.sveltefrontend/viewer/src/lib/sandbox/EditorSandbox.svelte
📚 Learning: 2025-06-26T09:30:15.140Z
Learnt from: myieye
Repo: sillsdev/languageforge-lexbox PR: 1768
File: frontend/viewer/src/lib/components/stomp/stomp-guard.svelte.ts:30-34
Timestamp: 2025-06-26T09:30:15.140Z
Learning: In the StompGuard implementation in frontend/viewer/src/lib/components/stomp/stomp-guard.svelte.ts, the developer prefers to keep assertion calls using parentGetter even if they're somewhat wasteful, prioritizing debugging and state validation over minor performance optimizations.
Applied to files:
frontend/viewer/src/stories/editor/stomping/stomp-safe-lcm-rich-text-editor.stories.svelte
📚 Learning: 2025-07-31T17:31:59.999Z
Learnt from: imnasnainaec
Repo: sillsdev/languageforge-lexbox PR: 1867
File: platform.bible-extension/src/utils/fw-lite-api.ts:48-53
Timestamp: 2025-07-31T17:31:59.999Z
Learning: In the sillsdev/languageforge-lexbox platform.bible-extension, the FwLiteApi.doesProjectMatchLanguage() method uses JSON.stringify() on writingSystems.vernacular data as an intentional temporary placeholder ("stand-in") until proper language code access can be implemented. This is not a code quality issue but a deliberate temporary solution.
Applied to files:
frontend/viewer/src/project/tasks/tasks-service.tsfrontend/viewer/src/project/demo/in-memory-demo-api.tsfrontend/viewer/src/lib/writing-system/WritingSystemDialog.svelte
📚 Learning: 2025-07-31T17:36:44.625Z
Learnt from: imnasnainaec
Repo: sillsdev/languageforge-lexbox PR: 1867
File: platform.bible-extension/src/web-views/find-related-words.web-view.tsx:16-16
Timestamp: 2025-07-31T17:36:44.625Z
Learning: In the sillsdev/languageforge-lexbox repository's platform.bible-extension, ESLint rule disables for react-hooks/rules-of-hooks in web-view files are intentional design decisions, not issues that need to be addressed.
Applied to files:
frontend/viewer/src/project/browse/filter/PartOfSpeechSelect.svelte
📚 Learning: 2025-06-18T13:29:57.190Z
Learnt from: myieye
Repo: sillsdev/languageforge-lexbox PR: 1759
File: frontend/viewer/src/project/ProjectSidebar.svelte:29-31
Timestamp: 2025-06-18T13:29:57.190Z
Learning: The `onSync` method in `ProjectEventBus` handles event listener cleanup internally and doesn't require manual unsubscription when the component is destroyed.
Applied to files:
frontend/viewer/src/lib/services/event-bus.ts
📚 Learning: 2025-07-07T06:02:41.194Z
Learnt from: hahn-kev
Repo: sillsdev/languageforge-lexbox PR: 1804
File: backend/FwLite/LcmCrdt/CurrentProjectService.cs:18-19
Timestamp: 2025-07-07T06:02:41.194Z
Learning: In the CurrentProjectService class, the service locator pattern is intentionally used to retrieve IDbContextFactory<LcmCrdtDbContext> and EntrySearchServiceFactory because these services indirectly depend on CurrentProjectService to have the current project set, creating a circular dependency. This is an acceptable use of service locator to break the circular dependency while keeping project context responsibility consolidated.
Applied to files:
frontend/viewer/src/project/demo/in-memory-demo-api.ts
📚 Learning: 2025-07-04T17:00:57.368Z
Learnt from: myieye
Repo: sillsdev/languageforge-lexbox PR: 1802
File: frontend/viewer/src/project/NewEntryButton.svelte:36-36
Timestamp: 2025-07-04T17:00:57.368Z
Learning: In this codebase, `$props.id()` (Svelte rune) automatically returns a unique identifier per component instance, so components using it do not require an explicit `id` prop from parents.
Applied to files:
frontend/viewer/src/lib/entry-editor/field-editors/ComplexForms.svelte
🧬 Code graph analysis (1)
frontend/viewer/src/project/demo/in-memory-demo-api.ts (3)
frontend/viewer/src/lib/dotnet-types/generated-types/FwLiteShared/Services/IMiniLcmJsInvokable.ts (1)
IMiniLcmJsInvokable(24-69)frontend/viewer/src/project/project-context.svelte.ts (2)
projectName(58-61)initProjectContext(28-32)frontend/viewer/src/project/demo/demo-entry-data.ts (1)
projectName(3-3)
🔇 Additional comments (72)
frontend/viewer/src/lib/components/field-editors/multi-ws-input.svelte (1)
8-8: LGTM! Clean import path update.The migration to the
$projectalias improves module organization and is consistent with the PR's reorganization objectives.frontend/viewer/src/DotnetProjectView.svelte (1)
14-14: LGTM! Clean migration to the$projectalias.The import path update correctly uses the new project-scoped alias, improving module organization without any functional changes.
frontend/viewer/src/lib/services/history-service.ts (1)
5-5: LGTM! Consistent alias migration.The import path correctly adopts the new
$projectalias for project-scoped modules.frontend/viewer/src/home/HomeView.svelte (1)
17-17: LGTM! Better component organization.Moving
ThemePickerinto the$lib/components/directory improves the file structure by consolidating UI components.frontend/viewer/src/lib/services/event-bus.ts (1)
9-9: LGTM! Alias migration applied consistently.The import path update aligns with the project-wide migration to the
$projectalias.frontend/viewer/src/lib/sandbox/EditorSandbox.svelte (1)
10-10: LGTM! Demo data appropriately scoped.Moving demo data to
$project/demo/better organizes project-specific test data and aligns with the new module structure.frontend/viewer/src/project/SyncDialog.svelte (1)
16-16: LGTM! Consistent with project reorganization.The import path correctly uses the
$projectalias, maintaining consistency across the codebase.frontend/viewer/src/lib/services/service-provider.ts (1)
19-19: LGTM! Improved maintainability with alias.Replacing the relative import path with the
$projectalias improves maintainability and consistency across service modules.frontend/viewer/src/project/ProjectDropdown.svelte (1)
14-14: LGTM! Completes the consistent alias migration.The import path update correctly applies the
$projectalias, completing the systematic reorganization across project components.frontend/viewer/src/lib/services/save-event-service.svelte.ts (1)
1-1: LGTM! Clean import path update.The migration to the
$projectalias correctly reflects the new module organization.frontend/viewer/src/lib/services/feature-service.ts (1)
2-2: LGTM! Import path correctly updated.The change aligns with the project-wide migration to the
$projectalias.frontend/viewer/src/lib/services/sync-status-service.ts (1)
3-3: LGTM! Import path migration successful.The updated path to
$project/project-context.sveltemaintains access to bothProjectContextanduseProjectContext.frontend/viewer/src/lib/components/field-editors/rich-multi-ws-input.svelte (1)
9-9: LGTM! Import path correctly updated.The change is consistent with the broader refactoring to use the
$projectalias for project-scoped modules.frontend/viewer/src/lib/layout/DevToolsDialog.svelte (1)
6-6: LGTM! Imports successfully migrated to new module structure.Both imports correctly use the new paths:
useWritingSystemServicenow leverages the barrel export at$project/datauseProjectContextuses the$projectaliasThe refactoring improves module organization without changing functionality.
Also applies to: 9-9
frontend/viewer/src/TestProjectView.svelte (1)
3-3: LGTM! Class rename and path migration completed successfully.The changes correctly update both the import and usage:
- Renamed class from
InMemoryApiServicetoInMemoryDemoApi(more descriptive)- Import path migrated to
$project/demo/in-memory-demo-apiThe refactoring improves clarity and module organization.
Also applies to: 6-6
frontend/viewer/src/lib/sandbox/Sandbox.svelte (1)
2-2: LGTM! Comprehensive refactoring successfully applied.All import path updates are correct and improve code organization:
- Component imports moved to appropriate subdirectories (
$lib/views/,$lib/components/)- Demo API renamed to
InMemoryDemoApiand migrated to$project/demo/- Writing system service now uses the barrel export at
$project/dataThe refactoring enhances module structure without altering functionality.
Also applies to: 8-8, 17-17, 21-21, 51-51
frontend/viewer/src/project/demo/in-memory-demo-api.ts (2)
24-24: LGTM! Import paths correctly updated.The import path updates align with the new module organization using the
$projectalias and project-specific data modules.Also applies to: 27-27, 34-34
66-66: LGTM! Class rename completed successfully.The rename from
InMemoryApiServicetoInMemoryDemoApiis thorough and improves clarity:
- Class declaration updated
- Static factory methods (
newProjectContext,setup) return the correct type- All instantiations use the new class name
The new name better conveys that this is a demo/mock API implementation.
Also applies to: 76-84, 81-117
frontend/viewer/.storybook/decorators/FWLiteDecorator.svelte (1)
19-19: LGTM: Clean path reorganization and renameThe import path updates and the rename from
InMemoryApiServicetoInMemoryDemoApialign with the PR's reorganization objectives. The changes are consistent and maintain the same functionality.Also applies to: 25-25, 40-40
frontend/viewer/src/project/SidebarPrimaryAction.svelte (1)
2-2: LGTM: Correct alias usageThe import path correctly uses the new
$projectalias for project-scoped modules.frontend/viewer/src/project/browse/filter/WsSelect.svelte (1)
3-3: LGTM: Correct barrel export usageThe import correctly uses the new barrel export at
$project/datato access both the service hook and type.frontend/viewer/src/project/data/complex-form-types.ts (1)
1-1: LGTM: Correct alias usageThe import path correctly uses the new
$projectalias.frontend/viewer/src/lib/entry-editor/field-editors/ComplexFormComponents.svelte (1)
7-7: LGTM: Correct barrel export usageThe import correctly uses the barrel export at
$project/data.frontend/viewer/src/project/browse/EntriesList.svelte (1)
20-20: LGTM: Correct alias usageThe import path correctly uses the new
$projectalias.frontend/viewer/src/stories/editor/fields/ws-input.stories.svelte (1)
2-2: LGTM: Correct alias usage for demo dataThe import path correctly uses the new
$projectalias for demo-scoped modules.frontend/viewer/src/project/browse/SenseRow.svelte (1)
5-5: LGTM! Clean import path refactoring.The import path correctly uses the new
$project/databarrel export. Component functionality remains unchanged.frontend/viewer/src/project/data/semantic-domains.ts (1)
1-1: LGTM! Import path correctly updated.The import path now uses the
$projectalias, aligning with the PR's module reorganization.frontend/viewer/src/lib/components/dictionary/Headwords.svelte (1)
5-5: LGTM! Import path refactored correctly.The import now uses the
$project/datapath, maintaining the same functionality while aligning with the new module structure.frontend/viewer/src/project/data/project-stats.ts (1)
1-2: LGTM! Import paths correctly refactored.Both imports now use explicit, well-organized paths that align with the new module structure. Functionality is preserved.
frontend/viewer/src/stories/editor/fields/multi-ws-input.stories.svelte (1)
2-2: LGTM! Demo data import correctly relocated.The import path now uses
$project/demo, properly scoping demo-specific data under the project structure.frontend/viewer/src/project/browse/filter/FieldSelect.svelte (1)
2-2: LGTM! Type import path correctly updated.The
WritingSystemSelectiontype import now uses the$project/databarrel, maintaining type safety while aligning with the new structure.frontend/viewer/src/stories/editor/misc/entry-picker.stories.svelte (1)
5-5: LGTM! Import path refactored to use project data barrel.The import correctly references both the service hook and type from
$project/data, maintaining the same functionality.frontend/viewer/src/project/browse/BrowseView.svelte (1)
17-17: LGTM! Project context import correctly relocated.The import path now uses
$project/project-context.svelte, properly organizing project-specific context under the$projectalias.frontend/viewer/src/lib/activity/ActivityItemChangePreview.svelte (1)
19-19: LGTM! Clean component reorganization.The Headwords component is now properly located under the dictionary components directory, improving module organization.
frontend/viewer/src/stories/editor/stomping/stomp-safe-lcm-rich-text-editor.stories.svelte (1)
3-3: LGTM! Adopts the new barrel export pattern.The
asStringutility now imports from the centralized$project/databarrel, consistent with the PR's reorganization goals.frontend/viewer/src/lib/entry-editor/field-editors/ComplexForms.svelte (1)
6-6: LGTM! Barrel export consolidation.Importing
useWritingSystemServicefrom the centralized$project/databarrel simplifies module resolution and aligns with the PR's reorganization strategy.frontend/viewer/src/lib/entry-editor/object-editors/SenseEditorPrimitive.svelte (1)
3-3: LGTM! Excellent consolidation.Importing all three data hooks (
usePartsOfSpeech,useSemanticDomains,useWritingSystemService) from the single$project/databarrel significantly improves readability and maintainability by reducing import verbosity.frontend/viewer/src/lib/components/field-editors/audio-input.svelte (1)
46-46: LGTM! Proper module scoping.Both import updates improve organization:
useProjectContextnow uses the$projectalias for project-scoped modulesOverrideFieldsrelocated to the$lib/viewsdirectory for better categorizationAlso applies to: 58-58
frontend/viewer/src/stories/editor/fields/rich-ws-input.stories.svelte (1)
2-2: LGTM! Demo data properly scoped.Moving demo data to
$project/demo/demo-entry-dataproperly scopes test fixtures under the project alias, consistent with the reorganization effort.frontend/viewer/src/project/ProjectSidebar.svelte (1)
12-12: LGTM! Comprehensive reorganization.All three import updates align with the PR's goals:
ThemePickermoved to components directoryuseProjectStatsnow accessed via the$project/databarreluseProjectContextproperly scoped under the$projectaliasAlso applies to: 21-21, 26-26
frontend/viewer/src/project/data/publications.svelte.ts (1)
3-3: LGTM! Internal consistency maintained.The project context import now uses the
$projectalias, maintaining consistency within the project data module that's exported by the barrel.frontend/viewer/vite.config.ts (1)
35-38: LGTM! Clean alias configuration.The new
$projectalias is correctly configured alongside the existing$libalias, supporting the module reorganization throughout the codebase.frontend/viewer/src/lib/entry-editor/object-editors/EntryEditor.svelte (1)
19-19: LGTM! Import path updated to use project data barrel.The import now uses the centralized
$project/databarrel, consistent with the project-wide reorganization.frontend/viewer/tsconfig.json (1)
20-22: LGTM! TypeScript path aliases correctly configured.The new
$projectaliases are properly added with correct relative paths, and the necessary comma is added to the preceding entry for valid JSON syntax.frontend/viewer/src/project/data/parts-of-speech.svelte.ts (1)
3-3: LGTM! Import path updated to project namespace.The import correctly uses the new
$projectalias for project-context, aligning with the module reorganization.frontend/viewer/src/stories/editor/fields/rich-multi-ws-input.stories.svelte (1)
3-3: LGTM! Demo data import path updated.The import correctly uses the new
$project/demopath for demo entry data, consistent with the reorganization.frontend/viewer/src/lib/DialogsProvider.svelte (1)
5-5: LGTM! Import path updated to project namespace.The import correctly uses the new
$projectalias for project-context, maintaining proper separation between lib and project modules.frontend/viewer/src/project/browse/filter/SemanticDomainSelect.svelte (2)
2-2: LGTM! Consolidated imports via project data barrel.The imports now use the centralized
$project/databarrel, simplifying the import statements and aligning with the barrel file pattern introduced in this PR.
11-11: LGTM! Function imports consolidated.Clean consolidation of semantic domains and writing system service imports through the project data barrel.
frontend/viewer/src/project/tasks/SubjectPopup.svelte (2)
7-7: LGTM! Import path updated to views subdirectory.The OverrideFields component path now correctly reflects its location in the
viewssubdirectory, improving code organization.
18-18: LGTM! Import path updated to components subdirectory.The DictionaryEntry import path now correctly uses the
components/dictionarysubdirectory structure.frontend/viewer/src/lib/services/dialogs-service.ts (1)
1-3: LGTM! Clean import path reorganization.The import paths have been successfully updated to use the new
$projectalias for project-scoped modules, with writing system services now imported from the consolidated$project/databarrel. The logic remains unchanged.frontend/viewer/src/WebComponent.svelte (1)
13-14: LGTM! Module paths correctly updated.The imports have been migrated to the new
$projectalias, with demo-related modules appropriately moved to$project/demo. No functional changes to the component logic.frontend/viewer/src/project/data/writing-system-service.svelte.ts (1)
11-12: LGTM! Import paths correctly updated for new file location.The imports have been updated to reflect the file's new location in the
project/datadirectory, withfirstTruthynow imported from the centralized$lib/utilsand project context from the$projectalias.frontend/viewer/src/lib/entry-editor/NewEntryDialog.svelte (1)
11-12: LGTM! Import paths updated correctly.The imports have been updated to reference
OverrideFieldsfrom its new location in the views directory anduseWritingSystemServicefrom the$project/databarrel. No changes to the dialog's logic or behavior.frontend/viewer/src/lib/views/OverrideFields.svelte (1)
4-4: LGTM! Import path corrected.The import path has been fixed to correctly reference
view-datafrom the same directory, removing the erroneous nestedviews/segment.frontend/viewer/src/lib/activity/ActivityView.svelte (1)
4-4: LGTM! Import path updated to new alias.The import has been updated to use the
$projectalias for project context. No functional changes to the activity view.frontend/viewer/vitest.config.ts (1)
29-32: LGTM! Test configuration correctly updated.The
$projectalias has been properly added to all three test project configurations (unit, browser, and storybook), ensuring that tests can resolve the new import paths. This mirrors the existing$libalias pattern and is essential for the reorganization.Also applies to: 53-56, 81-84
frontend/viewer/src/stories/editor/fields/1_overview.stories.svelte (1)
5-5: LGTM! Demo data import updated correctly.The import has been updated to reference demo data from its new location at
$project/demo/demo-entry-data. The story logic remains unchanged.frontend/viewer/src/lib/components/dictionary/DictionaryEntry.svelte (2)
3-4: LGTM! Clean import path refactoring.The updated import paths using
$project/dataalign well with the centralized barrel export pattern introduced in this PR.
3-3: LGTM! Simplified import using barrel export.frontend/viewer/src/project/browse/EntryView.svelte (1)
11-11: LGTM! Import paths updated for better organization.Both the data service import and component path update align with the module reorganization objectives.
Also applies to: 21-21
frontend/viewer/src/project/tasks/ReviewList.svelte (1)
6-6: LGTM! Consistent with the centralized data service pattern.frontend/viewer/src/project/browse/EntryMenu.svelte (1)
6-6: LGTM! Import paths reorganized appropriately.Also applies to: 17-17
frontend/viewer/src/project/tasks/tasks-service.ts (1)
1-2: LGTM! Consolidated imports using project-scoped modules.The migration to
$project/dataand$project/project-context.svelteimproves code organization and aligns with the module structure refactoring.frontend/viewer/src/lib/entry-editor/object-editors/ExampleEditorPrimitive.svelte (1)
5-5: LGTM! Import path updated to use centralized data barrel.frontend/viewer/src/project/browse/EntryRow.svelte (1)
2-2: LGTM! Well-organized import consolidation.Consolidating the data service imports and updating the component path improves code maintainability.
Also applies to: 6-6
frontend/viewer/src/lib/components/OpenInFieldWorksButton.svelte (1)
4-11: LGTM! Import path reorganization looks clean.The updated import paths correctly reflect the file's new location and the introduction of the
$projectalias for project-scoped modules.frontend/viewer/src/lib/entry-editor/object-editors/EntryEditorPrimitive.svelte (1)
9-9: LGTM! Consolidated imports through the barrel module.The import consolidation from the new
$project/databarrel module is a clean refactor that reduces import boilerplate.frontend/viewer/src/project/data/index.ts (1)
1-6: LGTM! Well-structured barrel module.The barrel export pattern consolidates project data module exports into a single entry point, improving import ergonomics across the codebase.
frontend/viewer/src/project/browse/SearchFilter.svelte (1)
10-10: LGTM! Consistent use of the barrel module.The consolidated import from
$project/dataaligns with the codebase-wide refactoring to use the new barrel pattern.frontend/viewer/src/lib/writing-system/WritingSystemDialog.svelte (1)
3-3: LGTM! Clean refactoring to centralized data module.The import path change correctly uses the new barrel file pattern, improving module organization without affecting functionality.
frontend/viewer/src/project/browse/filter/PartOfSpeechSelect.svelte
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (1)
frontend/viewer/src/project/browse/filter/PartOfSpeechSelect.svelte (1)
2-3: Inconsistent import pattern: use barrel export.As noted in a previous review, these imports should use the
$project/databarrel export for consistency with other files in this PR (e.g., ComplexForms.svelte line 6, WritingSystemDialog.svelte line 3, SenseRow.svelte line 5).Apply this diff:
- import {useWritingSystemService} from '$project/data/writing-system-service.svelte'; - import {usePartsOfSpeech} from '$project/data/parts-of-speech.svelte'; + import {useWritingSystemService, usePartsOfSpeech} from '$project/data';
🧹 Nitpick comments (1)
frontend/viewer/src/lib/components/dictionary/Headwords.svelte (1)
5-5: Use barrel export for consistency.This file imports directly from the full module path, while other files in this PR (e.g.,
EntryEditor.svelte,WsSelect.svelte,entry-picker.stories.svelte) correctly import from the$project/databarrel export. Using the barrel export ensures consistency and makes future refactoring easier.Apply this diff to use the barrel export:
- import {useWritingSystemService} from '$project/data/writing-system-service.svelte'; + import {useWritingSystemService} from '$project/data';
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (69)
frontend/viewer/.storybook/decorators/FWLiteDecorator.svelte(2 hunks)frontend/viewer/src/DotnetProjectView.svelte(1 hunks)frontend/viewer/src/TestProjectView.svelte(1 hunks)frontend/viewer/src/WebComponent.svelte(1 hunks)frontend/viewer/src/home/HomeView.svelte(1 hunks)frontend/viewer/src/lib/DialogsProvider.svelte(1 hunks)frontend/viewer/src/lib/activity/ActivityItemChangePreview.svelte(1 hunks)frontend/viewer/src/lib/activity/ActivityView.svelte(1 hunks)frontend/viewer/src/lib/components/OpenInFieldWorksButton.svelte(1 hunks)frontend/viewer/src/lib/components/dictionary/DictionaryEntry.svelte(1 hunks)frontend/viewer/src/lib/components/dictionary/Headwords.svelte(1 hunks)frontend/viewer/src/lib/components/field-editors/audio-input.svelte(2 hunks)frontend/viewer/src/lib/components/field-editors/multi-ws-input.svelte(1 hunks)frontend/viewer/src/lib/components/field-editors/rich-multi-ws-input.svelte(1 hunks)frontend/viewer/src/lib/entry-editor/NewEntryDialog.svelte(1 hunks)frontend/viewer/src/lib/entry-editor/field-editors/ComplexFormComponents.svelte(1 hunks)frontend/viewer/src/lib/entry-editor/field-editors/ComplexForms.svelte(1 hunks)frontend/viewer/src/lib/entry-editor/object-editors/EntryEditor.svelte(1 hunks)frontend/viewer/src/lib/entry-editor/object-editors/EntryEditorPrimitive.svelte(1 hunks)frontend/viewer/src/lib/entry-editor/object-editors/ExampleEditorPrimitive.svelte(1 hunks)frontend/viewer/src/lib/entry-editor/object-editors/SenseEditorPrimitive.svelte(1 hunks)frontend/viewer/src/lib/layout/DevToolsDialog.svelte(1 hunks)frontend/viewer/src/lib/sandbox/EditorSandbox.svelte(1 hunks)frontend/viewer/src/lib/sandbox/Sandbox.svelte(3 hunks)frontend/viewer/src/lib/services/dialogs-service.ts(1 hunks)frontend/viewer/src/lib/services/event-bus.ts(1 hunks)frontend/viewer/src/lib/services/feature-service.ts(1 hunks)frontend/viewer/src/lib/services/history-service.ts(1 hunks)frontend/viewer/src/lib/services/save-event-service.svelte.ts(1 hunks)frontend/viewer/src/lib/services/service-provider.ts(1 hunks)frontend/viewer/src/lib/services/sync-status-service.ts(1 hunks)frontend/viewer/src/lib/views/OverrideFields.svelte(1 hunks)frontend/viewer/src/lib/writing-system/WritingSystemDialog.svelte(1 hunks)frontend/viewer/src/project/ProjectDropdown.svelte(1 hunks)frontend/viewer/src/project/ProjectSidebar.svelte(2 hunks)frontend/viewer/src/project/SidebarPrimaryAction.svelte(1 hunks)frontend/viewer/src/project/SyncDialog.svelte(1 hunks)frontend/viewer/src/project/browse/BrowseView.svelte(1 hunks)frontend/viewer/src/project/browse/EntriesList.svelte(1 hunks)frontend/viewer/src/project/browse/EntryMenu.svelte(2 hunks)frontend/viewer/src/project/browse/EntryRow.svelte(1 hunks)frontend/viewer/src/project/browse/EntryView.svelte(2 hunks)frontend/viewer/src/project/browse/SearchFilter.svelte(1 hunks)frontend/viewer/src/project/browse/SenseRow.svelte(1 hunks)frontend/viewer/src/project/browse/filter/FieldSelect.svelte(1 hunks)frontend/viewer/src/project/browse/filter/PartOfSpeechSelect.svelte(1 hunks)frontend/viewer/src/project/browse/filter/SemanticDomainSelect.svelte(2 hunks)frontend/viewer/src/project/browse/filter/WsSelect.svelte(1 hunks)frontend/viewer/src/project/data/complex-form-types.ts(1 hunks)frontend/viewer/src/project/data/index.ts(1 hunks)frontend/viewer/src/project/data/parts-of-speech.svelte.ts(1 hunks)frontend/viewer/src/project/data/project-stats.ts(1 hunks)frontend/viewer/src/project/data/publications.svelte.ts(1 hunks)frontend/viewer/src/project/data/semantic-domains.ts(1 hunks)frontend/viewer/src/project/data/writing-system-service.svelte.ts(1 hunks)frontend/viewer/src/project/demo/in-memory-demo-api.ts(3 hunks)frontend/viewer/src/project/tasks/ReviewList.svelte(1 hunks)frontend/viewer/src/project/tasks/SubjectPopup.svelte(1 hunks)frontend/viewer/src/project/tasks/tasks-service.ts(1 hunks)frontend/viewer/src/stories/editor/fields/1_overview.stories.svelte(1 hunks)frontend/viewer/src/stories/editor/fields/multi-ws-input.stories.svelte(1 hunks)frontend/viewer/src/stories/editor/fields/rich-multi-ws-input.stories.svelte(1 hunks)frontend/viewer/src/stories/editor/fields/rich-ws-input.stories.svelte(1 hunks)frontend/viewer/src/stories/editor/fields/ws-input.stories.svelte(1 hunks)frontend/viewer/src/stories/editor/misc/entry-picker.stories.svelte(1 hunks)frontend/viewer/src/stories/editor/stomping/stomp-safe-lcm-rich-text-editor.stories.svelte(1 hunks)frontend/viewer/tsconfig.json(1 hunks)frontend/viewer/vite.config.ts(1 hunks)frontend/viewer/vitest.config.ts(3 hunks)
🧰 Additional context used
🧠 Learnings (12)
📚 Learning: 2025-03-06T03:30:17.687Z
Learnt from: hahn-kev
Repo: sillsdev/languageforge-lexbox PR: 1522
File: frontend/viewer/src/lib/services/service-provider.ts:41-48
Timestamp: 2025-03-06T03:30:17.687Z
Learning: In the LexboxServiceProvider class, the default implementation of `nextEventAsync()` for the JsEventListener service intentionally returns an unresolved Promise (`new Promise<IFwEvent>(() => {})`) rather than a resolved one. This is a deliberate design choice related to event handling.
Applied to files:
frontend/viewer/src/lib/services/service-provider.ts
📚 Learning: 2025-06-18T05:13:00.591Z
Learnt from: hahn-kev
Repo: sillsdev/languageforge-lexbox PR: 1757
File: frontend/viewer/src/lib/components/field-editors/multi-select.svelte:130-136
Timestamp: 2025-06-18T05:13:00.591Z
Learning: In frontend/viewer/src/lib/components/field-editors/multi-select.svelte, the computeCommandScore function from 'bits-ui' handles empty filter strings appropriately and does not hide all options when the filter is empty, contrary to initial analysis assumptions.
Applied to files:
frontend/viewer/src/project/browse/filter/FieldSelect.sveltefrontend/viewer/src/lib/components/field-editors/multi-ws-input.sveltefrontend/viewer/src/stories/editor/fields/1_overview.stories.sveltefrontend/viewer/src/project/browse/filter/SemanticDomainSelect.sveltefrontend/viewer/src/lib/components/field-editors/rich-multi-ws-input.sveltefrontend/viewer/src/lib/entry-editor/field-editors/ComplexFormComponents.sveltefrontend/viewer/src/project/browse/filter/WsSelect.sveltefrontend/viewer/src/project/browse/SearchFilter.sveltefrontend/viewer/src/project/browse/filter/PartOfSpeechSelect.svelte
📚 Learning: 2025-07-31T17:31:59.999Z
Learnt from: imnasnainaec
Repo: sillsdev/languageforge-lexbox PR: 1867
File: platform.bible-extension/src/utils/fw-lite-api.ts:48-53
Timestamp: 2025-07-31T17:31:59.999Z
Learning: In the sillsdev/languageforge-lexbox platform.bible-extension, the FwLiteApi.doesProjectMatchLanguage() method uses JSON.stringify() on writingSystems.vernacular data as an intentional temporary placeholder ("stand-in") until proper language code access can be implemented. This is not a code quality issue but a deliberate temporary solution.
Applied to files:
frontend/viewer/src/lib/writing-system/WritingSystemDialog.sveltefrontend/viewer/src/project/tasks/tasks-service.tsfrontend/viewer/src/project/demo/in-memory-demo-api.ts
📚 Learning: 2025-06-18T13:29:57.190Z
Learnt from: myieye
Repo: sillsdev/languageforge-lexbox PR: 1759
File: frontend/viewer/src/project/ProjectSidebar.svelte:29-31
Timestamp: 2025-06-18T13:29:57.190Z
Learning: The `onSync` method in `ProjectEventBus` handles event listener cleanup internally and doesn't require manual unsubscription when the component is destroyed.
Applied to files:
frontend/viewer/src/lib/services/event-bus.ts
📚 Learning: 2025-08-14T12:50:25.135Z
Learnt from: myieye
Repo: sillsdev/languageforge-lexbox PR: 1906
File: frontend/viewer/src/lib/components/ui/dialog-shared/dialog-shared-root.svelte:3-3
Timestamp: 2025-08-14T12:50:25.135Z
Learning: In the dialog-shared-root.svelte component, the module-level `openDialogs` state is intentionally shared across all component instances to coordinate dialog stacking and overlay behavior across the entire application. This enables proper z-index management where newer dialogs appear on top and only the bottom dialog shows its overlay.
Applied to files:
frontend/viewer/src/lib/layout/DevToolsDialog.sveltefrontend/viewer/src/lib/DialogsProvider.sveltefrontend/viewer/src/lib/entry-editor/object-editors/EntryEditor.sveltefrontend/viewer/src/lib/sandbox/Sandbox.sveltefrontend/viewer/src/project/browse/EntryMenu.sveltefrontend/viewer/src/project/ProjectSidebar.svelte
📚 Learning: 2025-05-27T06:18:33.852Z
Learnt from: hahn-kev
Repo: sillsdev/languageforge-lexbox PR: 1710
File: frontend/viewer/src/project/browse/BrowseView.svelte:17-19
Timestamp: 2025-05-27T06:18:33.852Z
Learning: The NewEntryButton component in frontend/viewer/src/project/NewEntryButton.svelte already internally checks features.write permission and conditionally renders based on write access, so external disabled props are not needed.
Applied to files:
frontend/viewer/src/lib/layout/DevToolsDialog.sveltefrontend/viewer/src/lib/components/dictionary/Headwords.sveltefrontend/viewer/src/lib/services/dialogs-service.tsfrontend/viewer/src/lib/entry-editor/object-editors/EntryEditor.sveltefrontend/viewer/src/project/browse/EntryView.sveltefrontend/viewer/src/lib/entry-editor/field-editors/ComplexFormComponents.sveltefrontend/viewer/src/lib/entry-editor/NewEntryDialog.sveltefrontend/viewer/src/project/browse/EntryMenu.sveltefrontend/viewer/src/lib/entry-editor/field-editors/ComplexForms.sveltefrontend/viewer/src/lib/entry-editor/object-editors/EntryEditorPrimitive.sveltefrontend/viewer/src/project/browse/SearchFilter.sveltefrontend/viewer/src/stories/editor/misc/entry-picker.stories.sveltefrontend/viewer/src/lib/components/OpenInFieldWorksButton.svelte
📚 Learning: 2025-07-31T16:00:49.635Z
Learnt from: imnasnainaec
Repo: sillsdev/languageforge-lexbox PR: 1867
File: platform.bible-extension/src/types/fw-lite-extension.d.ts:4-22
Timestamp: 2025-07-31T16:00:49.635Z
Learning: In the sillsdev/languageforge-lexbox repository, the platform.bible-extension is intentionally tightly coupled with the frontend's dotnet-types. The relative imports from `../../../frontend/viewer/src/lib/dotnet-types/index.js` in the extension's type declarations are by design, not a maintainability issue that needs to be addressed.
Applied to files:
frontend/viewer/src/lib/components/dictionary/DictionaryEntry.sveltefrontend/viewer/src/lib/entry-editor/object-editors/ExampleEditorPrimitive.sveltefrontend/viewer/src/lib/components/dictionary/Headwords.sveltefrontend/viewer/src/project/tasks/tasks-service.tsfrontend/viewer/src/stories/editor/fields/1_overview.stories.sveltefrontend/viewer/src/project/tasks/ReviewList.sveltefrontend/viewer/src/project/browse/filter/SemanticDomainSelect.sveltefrontend/viewer/src/project/browse/EntryView.sveltefrontend/viewer/src/lib/entry-editor/object-editors/SenseEditorPrimitive.sveltefrontend/viewer/src/project/browse/EntryRow.sveltefrontend/viewer/src/DotnetProjectView.sveltefrontend/viewer/src/lib/services/feature-service.tsfrontend/viewer/src/project/data/parts-of-speech.svelte.tsfrontend/viewer/src/project/data/writing-system-service.svelte.tsfrontend/viewer/src/project/browse/filter/PartOfSpeechSelect.svelte
📚 Learning: 2025-07-22T09:19:37.386Z
Learnt from: rmunn
Repo: sillsdev/languageforge-lexbox PR: 1836
File: frontend/viewer/src/lib/components/audio/AudioDialog.svelte:25-25
Timestamp: 2025-07-22T09:19:37.386Z
Learning: In the sillsdev/languageforge-lexbox project, when file size limits or other constants need to be shared between C# backend and TypeScript frontend code, prefer exposing them through Reinforced.Typings type generation rather than hardcoding the values separately. This ensures consistency and prevents discrepancies when values change.
Applied to files:
frontend/viewer/src/lib/components/dictionary/DictionaryEntry.sveltefrontend/viewer/src/project/tasks/tasks-service.tsfrontend/viewer/src/project/browse/filter/SemanticDomainSelect.sveltefrontend/viewer/src/lib/entry-editor/object-editors/SenseEditorPrimitive.sveltefrontend/viewer/src/lib/sandbox/EditorSandbox.sveltefrontend/viewer/src/project/browse/EntryRow.sveltefrontend/viewer/src/project/demo/in-memory-demo-api.tsfrontend/viewer/src/lib/services/feature-service.tsfrontend/viewer/src/project/browse/filter/PartOfSpeechSelect.svelte
📚 Learning: 2025-07-30T04:53:41.702Z
Learnt from: rmunn
Repo: sillsdev/languageforge-lexbox PR: 1844
File: frontend/viewer/src/lib/entry-editor/ItemListItem.svelte:26-37
Timestamp: 2025-07-30T04:53:41.702Z
Learning: In frontend/viewer/src/lib/entry-editor/ItemListItem.svelte, the TODO comments for unused props `index` and `actions` are intentional reminders for future work to be completed in a separate PR, not issues to be resolved immediately. These represent planned functionality that will be implemented later.
Applied to files:
frontend/viewer/src/lib/components/field-editors/audio-input.sveltefrontend/viewer/src/lib/entry-editor/object-editors/ExampleEditorPrimitive.sveltefrontend/viewer/src/project/browse/SenseRow.sveltefrontend/viewer/src/project/tasks/SubjectPopup.sveltefrontend/viewer/src/lib/entry-editor/object-editors/EntryEditor.sveltefrontend/viewer/src/project/tasks/ReviewList.sveltefrontend/viewer/src/project/browse/EntryView.sveltefrontend/viewer/src/lib/entry-editor/field-editors/ComplexFormComponents.sveltefrontend/viewer/src/project/browse/EntryRow.sveltefrontend/viewer/src/project/browse/EntriesList.sveltefrontend/viewer/src/lib/entry-editor/NewEntryDialog.sveltefrontend/viewer/src/lib/sandbox/Sandbox.sveltefrontend/viewer/src/project/browse/EntryMenu.sveltefrontend/viewer/src/lib/entry-editor/field-editors/ComplexForms.sveltefrontend/viewer/src/lib/entry-editor/object-editors/EntryEditorPrimitive.sveltefrontend/viewer/src/project/browse/filter/PartOfSpeechSelect.svelte
📚 Learning: 2025-06-26T09:30:15.140Z
Learnt from: myieye
Repo: sillsdev/languageforge-lexbox PR: 1768
File: frontend/viewer/src/lib/components/stomp/stomp-guard.svelte.ts:30-34
Timestamp: 2025-06-26T09:30:15.140Z
Learning: In the StompGuard implementation in frontend/viewer/src/lib/components/stomp/stomp-guard.svelte.ts, the developer prefers to keep assertion calls using parentGetter even if they're somewhat wasteful, prioritizing debugging and state validation over minor performance optimizations.
Applied to files:
frontend/viewer/src/stories/editor/stomping/stomp-safe-lcm-rich-text-editor.stories.svelte
📚 Learning: 2025-07-07T06:02:41.194Z
Learnt from: hahn-kev
Repo: sillsdev/languageforge-lexbox PR: 1804
File: backend/FwLite/LcmCrdt/CurrentProjectService.cs:18-19
Timestamp: 2025-07-07T06:02:41.194Z
Learning: In the CurrentProjectService class, the service locator pattern is intentionally used to retrieve IDbContextFactory<LcmCrdtDbContext> and EntrySearchServiceFactory because these services indirectly depend on CurrentProjectService to have the current project set, creating a circular dependency. This is an acceptable use of service locator to break the circular dependency while keeping project context responsibility consolidated.
Applied to files:
frontend/viewer/src/project/demo/in-memory-demo-api.ts
📚 Learning: 2025-07-04T17:00:57.368Z
Learnt from: myieye
Repo: sillsdev/languageforge-lexbox PR: 1802
File: frontend/viewer/src/project/NewEntryButton.svelte:36-36
Timestamp: 2025-07-04T17:00:57.368Z
Learning: In this codebase, `$props.id()` (Svelte rune) automatically returns a unique identifier per component instance, so components using it do not require an explicit `id` prop from parents.
Applied to files:
frontend/viewer/src/lib/entry-editor/field-editors/ComplexForms.svelte
🔇 Additional comments (71)
frontend/viewer/src/lib/components/field-editors/rich-multi-ws-input.svelte (1)
9-9: LGTM! Import path update is correct and properly integrated.The import change from
$lib/project-context.svelteto$project/project-context.sveltealigns with the PR's reorganization. Verification confirms the$projectalias is configured invite.config.tsand no stale imports from the old path remain in the codebase.frontend/viewer/src/lib/services/history-service.ts (1)
5-5: Migration verified and complete.The import path change from
$lib/project-context.svelteto$project/project-context.svelteis correct and fully implemented:
- ✓ No remaining imports of the old path detected in the codebase
- ✓ File successfully moved to
frontend/viewer/src/project/project-context.svelte.ts- ✓
$projectalias properly configured intsconfig.json(lines 21-22) andvite.config.ts(line 37)- ✓ Import statement in history-service.ts correctly updated
frontend/viewer/src/lib/services/save-event-service.svelte.ts (1)
1-1: LGTM! Clean import path update.The import path change aligns with the module reorganization to use the
$projectalias.frontend/viewer/src/project/data/semantic-domains.ts (1)
1-1: LGTM! Import path updated consistently.The change aligns with the broader module reorganization strategy.
frontend/viewer/src/lib/services/service-provider.ts (1)
19-19: LGTM! Import path migrated to$projectalias.The change is consistent with the module reorganization and doesn't affect the service provider logic.
frontend/viewer/src/DotnetProjectView.svelte (1)
14-14: LGTM! Import path updated to$projectalias.The change aligns with the project-wide module reorganization.
frontend/viewer/src/project/data/complex-form-types.ts (1)
1-1: LGTM! Import path refactored consistently.The change supports the centralized project data barrel structure.
frontend/viewer/src/lib/services/sync-status-service.ts (1)
3-3: LGTM! Import path migrated to$projectalias.The change is consistent with the module reorganization effort.
frontend/viewer/src/lib/components/field-editors/multi-ws-input.svelte (1)
8-8: LGTM! Import path updated consistently.The change aligns with the project-wide migration to the
$projectalias.frontend/viewer/src/project/SyncDialog.svelte (1)
16-16: LGTM! Import path refactored to$projectalias.The change is consistent with the module reorganization strategy across all reviewed files.
frontend/viewer/src/lib/activity/ActivityView.svelte (1)
4-4: LGTM! Clean import path refactoring.The import path update to use the new
$projectalias is consistent with the module reorganization described in the PR objectives.frontend/viewer/src/home/HomeView.svelte (1)
17-17: LGTM! Component path reorganization.The ThemePicker import has been updated to reflect its new location in the components subdirectory, aligning with better project structure organization.
frontend/viewer/src/project/data/publications.svelte.ts (1)
3-3: LGTM! Consistent with the module reorganization.The import path correctly uses the new
$projectalias for project-scoped context.frontend/viewer/src/lib/services/feature-service.ts (1)
2-2: LGTM! Import path updated correctly.The change aligns with the project-wide migration to the
$projectalias for project-context imports.frontend/viewer/src/project/ProjectDropdown.svelte (1)
14-14: LGTM! Path alias updated appropriately.The import correctly uses the new
$projectalias, consistent with the broader refactoring effort.frontend/viewer/src/project/browse/EntriesList.svelte (1)
20-20: LGTM! Import path refactored correctly.The change properly uses the
$projectalias for accessing project-context, matching the pattern used throughout this refactoring.frontend/viewer/src/project/browse/BrowseView.svelte (1)
17-17: LGTM! Import path consistently updated.The change to use the
$projectalias is correct and aligns with the module reorganization across the codebase.frontend/viewer/tsconfig.json (1)
20-22: LGTM! Module alias configuration is correct.The new
$projectpath aliases are properly configured to support the project-scoped imports used throughout the refactoring. The trailing comma on line 20 is good practice for future additions.frontend/viewer/src/project/data/parts-of-speech.svelte.ts (1)
3-3: LGTM! Clean module resolution update.The import path update to use the
$projectalias aligns with the PR's reorganization objectives and improves module scoping.frontend/viewer/src/project/browse/EntryMenu.svelte (1)
6-6: LGTM! Module paths updated correctly.Both import updates are consistent with the reorganization:
- Writing system service now imports from the centralized
$project/databarrel- OpenInFieldWorksButton correctly references its new location under
$lib/componentsAlso applies to: 17-17
frontend/viewer/src/project/SidebarPrimaryAction.svelte (1)
2-2: LGTM! Consistent with the new project alias.The import path correctly uses the
$projectalias for project-scoped context.frontend/viewer/src/project/data/writing-system-service.svelte.ts (1)
11-12: LGTM! Import paths updated correctly.The project context import now uses the
$projectalias, aligning with the module reorganization.frontend/viewer/vitest.config.ts (1)
29-32: LGTM! Alias configuration consistent across all test projects.The
$projectalias is correctly added to all three test configurations (unit, browser, and storybook), ensuring consistent module resolution in tests.Also applies to: 53-56, 81-84
frontend/viewer/.storybook/decorators/FWLiteDecorator.svelte (1)
19-19: LGTM! Component relocations and API renaming applied correctly.The changes correctly reflect:
- ThemePicker moved to
$lib/componentssubdirectory- InMemoryApiService renamed to InMemoryDemoApi and relocated to
$project/demo- Setup call updated to match the renamed class
All changes are consistent with the module reorganization.
Also applies to: 25-25, 40-40
frontend/viewer/vite.config.ts (1)
35-38: LGTM! Vite alias configuration updated correctly.The resolve.alias configuration properly adds the
$projectalias while maintaining the existing$libalias. This infrastructure change enables project-scoped imports throughout the codebase.frontend/viewer/src/lib/components/OpenInFieldWorksButton.svelte (1)
4-11: LGTM! Import paths correctly adjusted for file relocation.All import paths have been properly updated to reflect the file's move from
$lib/OpenInFieldWorksButton.svelteto$lib/components/OpenInFieldWorksButton.svelte:
- Relative imports adjusted from
./to../for services, types, and utils- UI component imports simplified from
./components/ui/*to./ui/*(now that the file is inside the components directory)- Project context correctly uses the new
$projectaliasfrontend/viewer/src/project/demo/in-memory-demo-api.ts (2)
24-27: LGTM! Clean import path updates.The imports correctly use the new
$projectalias for project-context while maintaining a relative path for the adjacent data directory.
66-84: Rename verified as complete: no remaining references toInMemoryApiServicefound.Comprehensive search of the codebase confirms all references to the old
InMemoryApiServiceclass name have been successfully updated toInMemoryDemoApi. The rename is complete and consistent throughout.frontend/viewer/src/WebComponent.svelte (1)
13-14: LGTM! Import paths correctly updated.The imports now use the
$projectalias, aligning with the repository's new module organization structure.frontend/viewer/src/TestProjectView.svelte (1)
3-6: LGTM! Correct usage of renamed API.The import and usage correctly reference the renamed
InMemoryDemoApifrom its new location.frontend/viewer/src/lib/services/event-bus.ts (1)
9-9: LGTM! Path alias correctly updated.The import now uses the
$projectalias, moving the project context to its appropriate organizational scope.frontend/viewer/src/lib/sandbox/EditorSandbox.svelte (1)
10-10: LGTM! Demo data moved to appropriate scope.The demo data import now uses the
$project/demopath, better reflecting that this is project-specific demo content rather than a general library utility.frontend/viewer/src/stories/editor/fields/ws-input.stories.svelte (1)
2-2: LGTM! Story imports aligned with new structure.The demo data import correctly uses the new
$project/demopath, consistent with other story files in this PR.frontend/viewer/src/stories/editor/stomping/stomp-safe-lcm-rich-text-editor.stories.svelte (1)
3-3: LGTM! Using the new barrel export.The import now uses the centralized
$project/databarrel export, simplifying the import path.frontend/viewer/src/project/browse/filter/FieldSelect.svelte (1)
2-2: LGTM! Type import correctly updated.The type import now uses the centralized
$project/databarrel export, maintaining consistency across the codebase.frontend/viewer/src/stories/editor/fields/rich-ws-input.stories.svelte (1)
2-2: LGTM! Import path updated to use new project alias.The import path has been correctly updated to use the new
$projectalias for demo data.frontend/viewer/src/project/data/project-stats.ts (1)
1-2: LGTM! Import paths correctly updated.The imports have been properly updated to reflect the new module organization with the
$projectalias.frontend/viewer/src/stories/editor/misc/entry-picker.stories.svelte (1)
5-5: LGTM! Correctly uses the new data barrel export.The import correctly leverages the new barrel export at
$project/datafor centralized data service imports.frontend/viewer/src/stories/editor/fields/rich-multi-ws-input.stories.svelte (1)
3-3: LGTM! Import path updated consistently.The import path has been updated to use the
$projectalias, consistent with other story files in this PR.frontend/viewer/src/lib/activity/ActivityItemChangePreview.svelte (1)
19-19: LGTM! Component relocated to improve organization.The
Headwordscomponent has been moved to thedictionaryfolder, improving the organization of dictionary-related components.frontend/viewer/src/lib/entry-editor/object-editors/EntryEditor.svelte (1)
19-19: LGTM! Correctly uses the data barrel export.The import has been updated to use the centralized
$project/databarrel export, aligning with the new project structure.frontend/viewer/src/project/browse/filter/WsSelect.svelte (1)
3-3: LGTM! Correctly uses the data barrel export.The import has been properly updated to use the
$project/databarrel export for writing system services.frontend/viewer/src/lib/entry-editor/field-editors/ComplexForms.svelte (1)
6-6: LGTM! Consistent barrel export usage.The import path update to use the
$project/databarrel export aligns with the PR-wide module reorganization pattern.frontend/viewer/src/lib/writing-system/WritingSystemDialog.svelte (1)
3-3: LGTM! Consistent barrel export usage.The import update correctly uses the
$project/databarrel export pattern.frontend/viewer/src/lib/views/OverrideFields.svelte (1)
4-4: LGTM! Correct relative path adjustment.The simplified relative import path is appropriate since this file is already in the views directory.
frontend/viewer/src/stories/editor/fields/multi-ws-input.stories.svelte (1)
2-2: LGTM! Consistent with project alias reorganization.The import path update to
$project/demo/demo-entry-dataaligns with the PR's module reorganization pattern.frontend/viewer/src/lib/DialogsProvider.svelte (1)
5-5: LGTM! Appropriate use of project alias.Moving the project context import to
$project/project-context.svelteis consistent with the reorganization of project-level modules.frontend/viewer/src/project/browse/SenseRow.svelte (1)
5-5: LGTM! Consistent barrel export usage.The import correctly uses the
$project/databarrel export, consistent with other files in this PR.frontend/viewer/src/lib/components/field-editors/audio-input.svelte (2)
46-46: LGTM! Consistent with project alias reorganization.The import path update to
$project/project-context.sveltealigns with moving project-level modules to the$projectalias.
58-58: LGTM! Correct module relocation.The import path update to
$lib/views/OverrideFields.sveltereflects the appropriate relocation of this component to the views directory.frontend/viewer/src/lib/entry-editor/field-editors/ComplexFormComponents.svelte (1)
7-7: LGTM! Clean import path refactoring.The migration to the
$project/databarrel centralizes module resolution as intended.frontend/viewer/src/lib/services/dialogs-service.ts (1)
1-3: LGTM! Import paths updated correctly.Both imports now use the new project-scoped paths, aligning with the module reorganization.
frontend/viewer/src/lib/layout/DevToolsDialog.svelte (1)
6-9: LGTM! Consistent with project-wide refactoring.Import paths updated to use the new barrel exports and project context location.
frontend/viewer/src/project/ProjectSidebar.svelte (1)
12-26: LGTM! All import paths updated correctly.The changes align ThemePicker component location and migrate project data services to the centralized barrel.
frontend/viewer/src/lib/entry-editor/NewEntryDialog.svelte (1)
11-12: LGTM! Import reorganization applied correctly.Both OverrideFields and useWritingSystemService moved to their new locations.
frontend/viewer/src/lib/entry-editor/object-editors/ExampleEditorPrimitive.svelte (1)
5-5: LGTM! Writing system utilities migrated correctly.The import now uses the
$project/databarrel for bothasStringanduseWritingSystemService.frontend/viewer/src/stories/editor/fields/1_overview.stories.svelte (1)
5-5: LGTM! Demo data import relocated.The demo writing systems now import from the project-scoped demo data location.
frontend/viewer/src/lib/components/dictionary/DictionaryEntry.svelte (1)
3-4: LGTM! Data service imports reorganized.Both writing system and parts-of-speech services now import from the
$project/datalocation.frontend/viewer/src/project/browse/filter/SemanticDomainSelect.svelte (1)
2-2: LGTM - Clean barrel export consolidation.The import paths have been correctly updated to use the new
$project/databarrel. Type and function imports work correctly with their usage on lines 18-19.Also applies to: 11-11
frontend/viewer/src/project/browse/EntryView.svelte (1)
11-11: LGTM - Imports correctly updated.Both imports have been properly updated:
- Writing system service now uses the centralized barrel
- DictionaryEntry component path reflects its new location
Also applies to: 21-21
frontend/viewer/src/project/tasks/SubjectPopup.svelte (1)
7-7: LGTM - Component paths updated correctly.Both component imports reflect their new directory locations and are used correctly throughout the file.
Also applies to: 18-18
frontend/viewer/src/project/tasks/ReviewList.svelte (1)
6-6: LGTM - Service import correctly migrated.The writing system service import correctly uses the new
$project/databarrel.frontend/viewer/src/project/tasks/tasks-service.ts (1)
1-2: LGTM - Import paths correctly refactored.Both import statements have been properly updated:
- Writing system utilities now use the
$project/databarrel- Project context uses the new
$projectaliasAll usage throughout the file remains consistent.
frontend/viewer/src/lib/entry-editor/object-editors/SenseEditorPrimitive.svelte (1)
3-3: LGTM - Multiple imports successfully consolidated.Three separate service imports have been cleanly consolidated into a single barrel import from
$project/data. All service hooks are correctly initialized and used throughout the component.frontend/viewer/src/project/browse/EntryRow.svelte (1)
2-2: LGTM - Imports correctly refactored.Both the component relocation and service consolidation are properly implemented:
- DictionaryEntry uses its new component directory path
- Data services use the centralized
$project/databarrelAlso applies to: 6-6
frontend/viewer/src/lib/entry-editor/object-editors/EntryEditorPrimitive.svelte (1)
9-9: LGTM - Services correctly consolidated.Three service imports have been properly consolidated into the
$project/databarrel. All services (useWritingSystemService, useComplexFormTypes, usePublications) are correctly initialized on lines 34-36 and used throughout the component.frontend/viewer/src/project/data/index.ts (1)
1-6: LGTM! Clean barrel export implementation.The barrel export consolidates project data modules into a single import point, following standard patterns and improving module organization.
frontend/viewer/src/project/browse/SearchFilter.svelte (1)
10-10: LGTM! Import path correctly updated.The import now uses the new
$project/databarrel export while maintaining identical functionality.frontend/viewer/src/lib/sandbox/Sandbox.svelte (3)
2-2: LGTM! Component import paths updated.The import paths for
OverrideFieldsandThemePickerhave been correctly updated to reflect their new locations in the directory structure.Also applies to: 17-17
8-8: LGTM! API service rename applied consistently.The rename from
InMemoryApiServicetoInMemoryDemoApiimproves clarity and is consistently applied in both the import and usage.Also applies to: 51-51
21-21: LGTM! Data service import updated.The import now uses the new
$project/databarrel export, aligning with the reorganized data services structure.
Follow-up to #2081 (comment)