Skip to content

Conversation

@Enjoywater
Copy link
Collaborator

📌 요약

  • 초기 상태 관련 로직을 개선합니다.

📝 작업 내용

  • persist onRehydrateStorage option을 사용하여 storage 관리를 개선합니다.
    • 실패할 경우 스토리지 비우기
  • storage 데이터를 활용해 실행 코드를 초기화합니다.

🔍 스크린샷

2025-10-28.1.mov

💡 참고 사항

  • 상태 위치 변경 및 탭 추가시 초기화 코드 변경 필요

@Enjoywater Enjoywater self-assigned this Oct 28, 2025
@Enjoywater Enjoywater added the enhancement New feature or request label Oct 28, 2025
@ohah ohah requested a review from Copilot October 28, 2025 09:03
Copy link
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

This PR improves initial state management and persistence by enhancing storage handling and code initialization. The changes implement proper hydration error handling with automatic storage cleanup and restore initial code from persisted state.

Key Changes:

  • Added onRehydrateStorage option to handle persistence failures and reset execution state on app restart
  • Implemented getInitialCode function to initialize editor with persisted code from localStorage

Reviewed Changes

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

File Description
apps/executeJS/src/pages/editor/editor-page.tsx Added getInitialCode function to restore code from localStorage with fallback to default message
apps/executeJS/src/features/execute-code/model.ts Added onRehydrateStorage callback to handle hydration errors and reset execution state

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

@Enjoywater Enjoywater merged commit 2fe38c7 into main Oct 29, 2025
3 checks passed
ohah pushed a commit that referenced this pull request Dec 12, 2025
* feat: persist 에러 처리 추가

* feat: 실행 이력에 따른 초기 상태

* fix: format

* fix: 파일명 오류 수정
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants