Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -9621,7 +9621,7 @@ function initExactShell() {
mobile.addEventListener("change", order);
}

function setGenerationStageVisible(visible) {
function setGenerationStageVisible(visible, { preservePanel = false } = {}) {
const stage = document.getElementById("generation-stage");
if (!stage) return;
const hero = document.getElementById("hero");
Expand All @@ -9632,6 +9632,9 @@ function setGenerationStageVisible(visible) {
stage.classList.add("is-active");
} else {
cancelPipelineMorph();
// Returning to the composer retires the Home restoration marker, even
// after a run has settled. Only navigation preserves a hidden panel.
if (!preservePanel) document.getElementById("main-stage-container")?.classList.remove("visible");
document.body.classList.remove("results-fullscreen", "results-with-sidebar");
stage.classList.remove("is-active");
stage.inert = true;
Expand Down Expand Up @@ -9705,6 +9708,7 @@ function switchView(view, pushState = true, moveFocus = true) {
} else {
document.getElementById("results-view")?.classList.remove("visible");
document.getElementById("ready-state")?.classList.remove("hidden");
document.getElementById("main-stage-container")?.classList.remove("visible");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Abandoned runs expose unreviewed results

Leaving during Code Review makes switchView display Results because pipelineState.artifactBundle already exists. The review request is aborted, so Home presents unreviewed code as a completed result.

Learn more

Generator populates pipelineState.artifactBundle before Code Review completes in runThinkingPipeline. On navigation, updateSelectedArtifactPanels renders that bundle as Results even though pipelineState.step3Result has not arrived. The newly preserved panel marker then makes switchView('home') reveal those results. The no-bundle branch clears the marker, but the presence of a generated bundle does not prove a completed run.

Example: Architect and Generator succeed, then the user opens Account while Review is pending. Review is aborted; returning Home displays Results with the generated code instead of returning to the composer or a reviewed previous result.

Recommended fix: In switchView, distinguish a reviewed, completed result from a partially populated bundle before calling updateSelectedArtifactPanels. Clear the marker and return to the composer for an abandoned first run; if replacing an earlier result, restore its completed snapshot instead.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

}
}
}
Expand All @@ -9729,10 +9733,16 @@ function switchView(view, pushState = true, moveFocus = true) {
});

// Generation overlay only belongs to the home surface.
if (view !== "home") setGenerationStageVisible(false);
if (view !== "home") setGenerationStageVisible(false, { preservePanel: true });
else {
const stage = document.getElementById("main-stage-container");
if (stage && stage.classList.contains("visible")) setGenerationStageVisible(true);
if (stage && stage.classList.contains("visible")) {
// Navigation hides the surface, not the retained result or selected tab.
if (document.getElementById("results-view")?.classList.contains("visible")) {
document.body.classList.add("results-fullscreen", "results-with-sidebar");
}
setGenerationStageVisible(true);
}
}

if (pushState) {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1994,11 +1994,6 @@
}
.pipeline-view h3 {
font-size: 25px;
/* The longest phase title ("Understanding your prompt") measures
~304px at this size, past the 298px content column, so it wrapped
to two lines and pushed every later section down 30px. Tightening
tracking keeps the phase title to the canonical single line. */
letter-spacing: -0.045em;
}
.pipeline-progress .pipeline-glyph.logo-loop { margin-bottom: 16px; }
.pipeline-prompt-recap {
Expand Down Expand Up @@ -3310,7 +3305,7 @@
.send.is-busy .send-spin { animation: none; opacity: 0.6; }
}
</style>
<script type="module" crossorigin src="/assets/index-CrZGgSTH.js"></script>
<script type="module" crossorigin src="/assets/index-vWxoLxnc.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-BQUorxWE.css">
</head>
<body>
Expand Down
Loading
Loading