Rebalance review workspace layout
Browse files
app.py
CHANGED
|
@@ -1134,11 +1134,11 @@ with gr.Blocks() as demo:
|
|
| 1134 |
sample_btn = gr.Button("Load sample diff")
|
| 1135 |
|
| 1136 |
with gr.Row(equal_height=False):
|
| 1137 |
-
with gr.Column(scale=
|
| 1138 |
diff_input = gr.Textbox(
|
| 1139 |
value="",
|
| 1140 |
-
lines=
|
| 1141 |
-
max_lines=
|
| 1142 |
label="Unified diff or public GitHub PR URL",
|
| 1143 |
placeholder="Paste a unified diff, paste https://github.com/org/repo/pull/123, or click Load sample diff.",
|
| 1144 |
interactive=True,
|
|
@@ -1149,7 +1149,6 @@ with gr.Blocks() as demo:
|
|
| 1149 |
file_types=["image"],
|
| 1150 |
)
|
| 1151 |
run_btn = gr.Button("Review diff", variant="primary")
|
| 1152 |
-
with gr.Column(scale=4):
|
| 1153 |
summary_output = gr.Markdown(
|
| 1154 |
value="Run a review to get the risk summary.",
|
| 1155 |
label="Reviewer summary",
|
|
@@ -1158,13 +1157,13 @@ with gr.Blocks() as demo:
|
|
| 1158 |
value="### Model Runtime Status\n\n" + render_model_runtime_status(),
|
| 1159 |
label="Model agent trace",
|
| 1160 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1161 |
json_output = gr.JSON(label="Structured findings")
|
| 1162 |
|
| 1163 |
-
review_output = gr.HTML(
|
| 1164 |
-
value='<div class="empty-state">Paste a unified diff or public GitHub PR URL, then click Review diff.</div>',
|
| 1165 |
-
label="Inline diff review",
|
| 1166 |
-
)
|
| 1167 |
-
|
| 1168 |
sample_btn.click(fn=load_sample, outputs=diff_input)
|
| 1169 |
run_btn.click(
|
| 1170 |
fn=run_review,
|
|
|
|
| 1134 |
sample_btn = gr.Button("Load sample diff")
|
| 1135 |
|
| 1136 |
with gr.Row(equal_height=False):
|
| 1137 |
+
with gr.Column(scale=4):
|
| 1138 |
diff_input = gr.Textbox(
|
| 1139 |
value="",
|
| 1140 |
+
lines=18,
|
| 1141 |
+
max_lines=24,
|
| 1142 |
label="Unified diff or public GitHub PR URL",
|
| 1143 |
placeholder="Paste a unified diff, paste https://github.com/org/repo/pull/123, or click Load sample diff.",
|
| 1144 |
interactive=True,
|
|
|
|
| 1149 |
file_types=["image"],
|
| 1150 |
)
|
| 1151 |
run_btn = gr.Button("Review diff", variant="primary")
|
|
|
|
| 1152 |
summary_output = gr.Markdown(
|
| 1153 |
value="Run a review to get the risk summary.",
|
| 1154 |
label="Reviewer summary",
|
|
|
|
| 1157 |
value="### Model Runtime Status\n\n" + render_model_runtime_status(),
|
| 1158 |
label="Model agent trace",
|
| 1159 |
)
|
| 1160 |
+
with gr.Column(scale=6):
|
| 1161 |
+
review_output = gr.HTML(
|
| 1162 |
+
value='<div class="empty-state">Paste a unified diff or public GitHub PR URL, then click Review diff.</div>',
|
| 1163 |
+
label="Detailed inline review",
|
| 1164 |
+
)
|
| 1165 |
json_output = gr.JSON(label="Structured findings")
|
| 1166 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1167 |
sample_btn.click(fn=load_sample, outputs=diff_input)
|
| 1168 |
run_btn.click(
|
| 1169 |
fn=run_review,
|