aws / aws/graph-explorer

CodeEditor does not apply Monaco theme on initial render

Open
#1,645 0 comments 0 reactions 0 assignees View on GitHub
fundamental query editor reliability usability
Dominant language
TypeScript
Stars
481
Forks
108
Avg merge
6d 8h
Merged PRs (30d)
5

Description

## Description

The `CodeEditor` component does not load the Monaco editor theme on the initial render. The editor appears with the default theme instead of the configured one. On subsequent renders (e.g., closing and reopening the dialog), the theme is applied correctly.

This is visible in the Error Details dialog where the JSON code editor briefly shows with an incorrect theme before correcting itself.

## Environment

- OS: Any
- Browser: Any
- Graph Explorer Version: latest (main)
- Graph Database & Version: Any

## Steps to Reproduce

1. Trigger an error that includes response data (e.g., a network error with a JSON body)
2. Click "Error Details" to open the dialog
3. Observe the code editor renders without the correct theme
4. Close and reopen the dialog
5. The theme is now applied correctly

## Expected Behavior

The Monaco editor theme should be applied on the first render without requiring a re-render cycle.

---

> [!IMPORTANT]
> If you are interested in working on this issue, please leave a comment.

> [!TIP]
> Please use a 👍 reaction to provide a +1/vote. This helps the community and maintainers prioritize this request.

Contributor guide

Open the contributing guide

Research direction

Start by locating the CodeEditor component and the Error Details dialog, then reproduce the initial render and compare it with reopening the dialog. The work is done when the configured Monaco theme appears immediately in the editor on its first render, without relying on a later re-render.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.