Refactor development mode checks to use DEV_UI_ENABLED constant. Updated conditional logic throughout the App component to improve clarity and maintainability. Removed deprecated demo session button to streamline the UI.

This commit is contained in:
이정수 2026-01-30 14:56:10 +09:00
parent 9f7244185d
commit 03a3f85974
1 changed files with 8 additions and 22 deletions

View File

@ -113,7 +113,7 @@ const App = () => {
setGitCheckInProgress(true);
try {
if (IS_DEV && simulateToolsMissingRef.current) {
if (DEV_UI_ENABLED && simulateToolsMissingRef.current) {
const simulated = {
git: { ok: false, command: "git", error: "simulated_missing" },
lfs: { ok: false, command: "git lfs", error: "simulated_missing" },
@ -303,7 +303,7 @@ const App = () => {
if (serverRecoveryActive) {
setServerRecoveryActive(false);
if (IS_DEV) {
if (DEV_UI_ENABLED) {
setDevProceedReady(true);
} else {
scheduleScreenTransition("login");
@ -315,7 +315,7 @@ const App = () => {
return;
}
if (IS_DEV) {
if (DEV_UI_ENABLED) {
setDevProceedReady(true);
return;
}
@ -870,7 +870,9 @@ const App = () => {
className="ghost"
onClick={() => {
setSkipToolsCheck(true);
scheduleScreenTransition(IS_DEV ? "login" : hasSession ? "main" : "login");
scheduleScreenTransition(
DEV_UI_ENABLED ? "login" : hasSession ? "main" : "login"
);
}}
>
@ -878,7 +880,7 @@ const App = () => {
</div>
</div>
)}
{IS_DEV &&
{DEV_UI_ENABLED &&
serverHealthy &&
(skipToolsCheck ||
Boolean(gitCheckResult?.git.ok && gitCheckResult?.lfs.ok)) && (
@ -894,7 +896,7 @@ const App = () => {
</button>
)}
{IS_DEV && (
{DEV_UI_ENABLED && (
<button
type="button"
className="ghost"
@ -950,22 +952,6 @@ const App = () => {
>
</button>
<button
type="button"
className="ghost"
onClick={() => {
const fallbackId = loginId.trim() || "demo";
setProfile({
username: fallbackId,
nickname: "Demo",
level: 1
});
setHasSession(true);
setScreen("main");
}}
>
()
</button>
</div>
</section>
)}