Repository navigation
feat(editor): add a searchable KingSejong language reference panel - #5
Merged
Merged
Conversation
Learners can now look up KingSejong syntax and built-in functions next
to the editor. The panel opens from the header (and the "more" menu and
command palette), lists 43 entries in nine topics, filters as you type
in Korean or English, and inserts an entry's example at the editor
cursor as a single undoable edit.
- Content follows the language's LANGUAGE_REFERENCE.md and
STDLIB_REFERENCE.md (v0.6). Every example was run with the v0.6
interpreter and prints what its comments say. Built-ins for files,
network, databases and the environment are left out.
- Titles and descriptions are written in Korean and English; examples
are shared code.
- The panel is not modal so it can stay open while typing: docked on
the right from the lg breakpoint, an overlay drawer below it.
- For other languages the examples are read-only and the panel offers
to switch to KingSejong.
- Results whose name matches the query come before matches in the
description.
Lazily loaded panels now get a `loading` placeholder. Without one, the
first time the file list was opened in a development build the whole
page suspended and the Monaco editor crashed when it was recreated
("InstantiationService has been disposed").
0xmhha
force-pushed
the
feat/language-reference
branch
from
October 29, 2026 03:32
d266e4a to
58670b8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a searchable KingSejong syntax and keyword reference beside the editor.
for,print,filter...), descriptions and example code. Results whose name matches the query come first.messages/{ko,en}.json. The example code is shared between locales.Also fixes a development-build crash. The first time the file list was opened, the page showed the error screen ("InstantiationService has been disposed"). A new E2E test covers it.
Design
src/features/reference/entries.tsis written fromkingsejong-lang/docs/LANGUAGE_REFERENCE.mdandSTDLIB_REFERENCE.md(v0.6).kingsejong, built from the language repository), and each printed what its# ...comments say.lgit is docked on the right of the workspace, 320 px wide (384 px fromxl).lgit is an overlay drawer with a scrim, like the file list.insertionEditinCodeEditor.tsx):next/dynamicpanels without aloadingoption suspend the page's top-level<Suspense>while their chunk loads. That tears down Monaco, and recreating it threw.FileTreeand the new panel now passloading: () => null. I reproduced the crash onmainwithnext dev; anext startbuild ofmaindid not crash.Testing
npx vitest run: 268 tests pass. New tests cover:insertionEdit.npx playwright test tests/e2e/fake: 18 tests pass, including the new ones:reference.spec.ts: search for "filter", insert below existing code, one undo restores the file, and the read-only mode for Python with the switch to KingSejong;playground.spec.ts: opening the file list keeps the editor. This test fails onmain.next buildandnext startbuild of this branch, opening the file list and then the reference panel causes no page errors and no error screen.npm run typecheck: passes.npm run lint: 0 errors and 12 warnings, the same count as main.npm run build: passes.Not verified