Skip to content

fix previewenv to use services.object instead of services.ObjectService#3067

Merged
sawka merged 1 commit intomainfrom
sawka/fix-preview-env
Mar 15, 2026
Merged

fix previewenv to use services.object instead of services.ObjectService#3067
sawka merged 1 commit intomainfrom
sawka/fix-preview-env

Conversation

@sawka
Copy link
Member

@sawka sawka commented Mar 15, 2026

No description provided.

@sawka sawka merged commit b0d77a8 into main Mar 15, 2026
5 of 7 checks passed
@sawka sawka deleted the sawka/fix-preview-env branch March 15, 2026 01:00
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 15, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 1ddf27ce-0b14-4b89-9a87-aab34676f48f

📥 Commits

Reviewing files that changed from the base of the PR and between b1d7f42 and 29eed93.

📒 Files selected for processing (2)
  • frontend/app/view/preview/preview-model.tsx
  • frontend/app/view/preview/previewenv.ts

Walkthrough

This pull request refactors how the ObjectService is accessed in the preview component. A type alias in previewenv.ts is updated to rename the service property from ObjectService to object and update its type reference accordingly. Correspondingly, preview-model.tsx is updated to use the new property name across multiple method calls (goHistory, goHistoryBack, goHistoryForward, setEditMode, and a context menu editor action). All changes maintain identical behavior with no modifications to control flow or error handling.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch sawka/fix-preview-env
📝 Coding Plan
  • Generate coding plan for human review comments

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.

@kilo-code-bot
Copy link
Contributor

kilo-code-bot bot commented Mar 15, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

This PR correctly fixes a bug where the preview view was using incorrect property access to reach the ObjectService. The old code used PascalCase (ObjectService) which would have been undefined at runtime since the services object uses camelCase keys.

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 0

Changes Verified

  • previewenv.ts: Updated type definition from ObjectService: WaveEnv["services"]["ObjectService"] to object: WaveEnv["services"]["object"]
  • preview-model.tsx: Updated 6 occurrences from this.env.services.ObjectService.UpdateObjectMeta to this.env.services.object.UpdateObjectMeta

This aligns with the pattern used by other services in the codebase (e.g., workspace, block, window).

Files Reviewed (2 files)
  • frontend/app/view/preview/preview-model.tsx
  • frontend/app/view/preview/previewenv.ts

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.

1 participant