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); setGitCheckInProgress(true);
try { try {
if (IS_DEV && simulateToolsMissingRef.current) { if (DEV_UI_ENABLED && simulateToolsMissingRef.current) {
const simulated = { const simulated = {
git: { ok: false, command: "git", error: "simulated_missing" }, git: { ok: false, command: "git", error: "simulated_missing" },
lfs: { ok: false, command: "git lfs", error: "simulated_missing" }, lfs: { ok: false, command: "git lfs", error: "simulated_missing" },
@ -303,7 +303,7 @@ const App = () => {
if (serverRecoveryActive) { if (serverRecoveryActive) {
setServerRecoveryActive(false); setServerRecoveryActive(false);
if (IS_DEV) { if (DEV_UI_ENABLED) {
setDevProceedReady(true); setDevProceedReady(true);
} else { } else {
scheduleScreenTransition("login"); scheduleScreenTransition("login");
@ -315,7 +315,7 @@ const App = () => {
return; return;
} }
if (IS_DEV) { if (DEV_UI_ENABLED) {
setDevProceedReady(true); setDevProceedReady(true);
return; return;
} }
@ -870,7 +870,9 @@ const App = () => {
className="ghost" className="ghost"
onClick={() => { onClick={() => {
setSkipToolsCheck(true); 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>
</div> </div>
)} )}
{IS_DEV && {DEV_UI_ENABLED &&
serverHealthy && serverHealthy &&
(skipToolsCheck || (skipToolsCheck ||
Boolean(gitCheckResult?.git.ok && gitCheckResult?.lfs.ok)) && ( Boolean(gitCheckResult?.git.ok && gitCheckResult?.lfs.ok)) && (
@ -894,7 +896,7 @@ const App = () => {
</button> </button>
)} )}
{IS_DEV && ( {DEV_UI_ENABLED && (
<button <button
type="button" type="button"
className="ghost" className="ghost"
@ -950,22 +952,6 @@ const App = () => {
> >
</button> </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> </div>
</section> </section>
)} )}