Fix agent output validation to prevent false verified status (#807)

* Changes from fix/cursor-fix

* feat: Enhance provider error messages with diagnostic context, address test failure, fix port change, move playwright tests to different port

* Update apps/ui/src/components/views/board-view/dialogs/add-feature-dialog.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* ci: Update test server port from 3008 to 3108 and add environment configuration

* fix: Correct typo in health endpoint URL and standardize port env vars

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
gsxdsm
2026-02-24 20:18:40 -08:00
committed by GitHub
parent 0330c70261
commit 51e9a23ba1
36 changed files with 1610 additions and 104 deletions

View File

@@ -45,7 +45,7 @@ import { toast } from 'sonner';
import type { PRReviewComment } from '@/lib/electron';
import type { Feature } from '@/store/app-store';
import type { PhaseModelEntry } from '@automaker/types';
import { supportsReasoningEffort, isAdaptiveThinkingModel } from '@automaker/types';
import { supportsReasoningEffort, normalizeThinkingLevelForModel } from '@automaker/types';
import { resolveModelString } from '@automaker/model-resolver';
import { PhaseModelSelector } from '@/components/views/settings-view/model-defaults';
@@ -590,20 +590,10 @@ export function PRCommentResolutionDialog({
const wasOpenRef = useRef(false);
const handleModelChange = useCallback((entry: PhaseModelEntry) => {
// Normalize thinking level when switching between adaptive and non-adaptive models
const isNewModelAdaptive =
typeof entry.model === 'string' && isAdaptiveThinkingModel(entry.model);
const currentLevel = entry.thinkingLevel || 'none';
const modelId = typeof entry.model === 'string' ? entry.model : '';
const normalizedThinkingLevel = normalizeThinkingLevelForModel(modelId, entry.thinkingLevel);
if (isNewModelAdaptive && currentLevel !== 'none' && currentLevel !== 'adaptive') {
// Switching TO an adaptive model with a manual level -> auto-switch to 'adaptive'
setModelEntry({ ...entry, thinkingLevel: 'adaptive' });
} else if (!isNewModelAdaptive && currentLevel === 'adaptive') {
// Switching FROM an adaptive model with adaptive -> auto-switch to 'high'
setModelEntry({ ...entry, thinkingLevel: 'high' });
} else {
setModelEntry(entry);
}
setModelEntry({ ...entry, thinkingLevel: normalizedThinkingLevel });
}, []);
// Fetch PR review comments

View File

@@ -26,11 +26,12 @@ import { useNavigate } from '@tanstack/react-router';
import { toast } from 'sonner';
import { cn } from '@/lib/utils';
import { modelSupportsThinking } from '@/lib/utils';
import { useAppStore, ThinkingLevel, FeatureImage, PlanningMode, Feature } from '@/store/app-store';
import { useAppStore } from '@/store/app-store';
import type { ThinkingLevel, PlanningMode, Feature, FeatureImage } from '@/store/types';
import type { ReasoningEffort, PhaseModelEntry, AgentModel } from '@automaker/types';
import {
supportsReasoningEffort,
isAdaptiveThinkingModel,
normalizeThinkingLevelForModel,
getThinkingLevelsForModel,
} from '@automaker/types';
import {
@@ -308,20 +309,10 @@ export function AddFeatureDialog({
}, [planningMode]);
const handleModelChange = (entry: PhaseModelEntry) => {
// Normalize thinking level when switching between adaptive and non-adaptive models
const isNewModelAdaptive =
typeof entry.model === 'string' && isAdaptiveThinkingModel(entry.model);
const currentLevel = entry.thinkingLevel || 'none';
const modelId = typeof entry.model === 'string' ? entry.model : '';
const normalizedThinkingLevel = normalizeThinkingLevelForModel(modelId, entry.thinkingLevel);
if (isNewModelAdaptive && currentLevel !== 'none' && currentLevel !== 'adaptive') {
// Switching TO Opus 4.6 with a manual level -> auto-switch to 'adaptive'
setModelEntry({ ...entry, thinkingLevel: 'adaptive' });
} else if (!isNewModelAdaptive && currentLevel === 'adaptive') {
// Switching FROM Opus 4.6 with adaptive -> auto-switch to 'high'
setModelEntry({ ...entry, thinkingLevel: 'high' });
} else {
setModelEntry(entry);
}
setModelEntry({ ...entry, thinkingLevel: normalizedThinkingLevel });
};
const buildFeatureData = (): FeatureData | null => {

View File

@@ -1017,6 +1017,7 @@ export function PhaseModelSelector({
{/* Secondary zone: expand reasoning effort popover */}
<Popover
open={isExpanded}
modal={false}
onOpenChange={(isOpen) => {
if (!isOpen) {
setExpandedCodexModel(null);
@@ -1409,7 +1410,9 @@ export function PhaseModelSelector({
return (
<button
key={level}
onClick={() => {
onClick={(e) => {
e.stopPropagation();
e.preventDefault();
onChange({
providerId: provider.id,
model: model.id,
@@ -1497,6 +1500,7 @@ export function PhaseModelSelector({
{/* Secondary zone: expand thinking level popover */}
<Popover
open={isExpanded}
modal={false}
onOpenChange={(isOpen) => {
if (!isOpen) {
setExpandedProviderModel(null);
@@ -1549,7 +1553,9 @@ export function PhaseModelSelector({
return (
<button
key={level}
onClick={() => {
onClick={(e) => {
e.stopPropagation();
e.preventDefault();
onChange({
providerId: provider.id,
model: model.id,
@@ -1752,7 +1758,9 @@ export function PhaseModelSelector({
return (
<button
key={level}
onClick={() => {
onClick={(e) => {
e.stopPropagation();
e.preventDefault();
onChange({
model: model.id as ModelAlias,
thinkingLevel: level,
@@ -1856,6 +1864,7 @@ export function PhaseModelSelector({
{/* Secondary zone: expand thinking level popover */}
<Popover
open={isExpanded}
modal={false}
onOpenChange={(isOpen) => {
if (!isOpen) {
setExpandedClaudeModel(null);
@@ -1906,7 +1915,9 @@ export function PhaseModelSelector({
return (
<button
key={level}
onClick={() => {
onClick={(e) => {
e.stopPropagation();
e.preventDefault();
onChange({
model: model.id as ModelAlias,
thinkingLevel: level,
@@ -2054,6 +2065,7 @@ export function PhaseModelSelector({
>
<Popover
open={isExpanded}
modal={false}
onOpenChange={(isOpen) => {
if (!isOpen) {
setExpandedGroup(null);

View File

@@ -20,11 +20,11 @@ export const DEFAULT_HEIGHT = 950;
// ============================================
// Default ports (can be overridden via env) - will be dynamically assigned if these are in use
// When launched via root init.mjs we pass:
// - PORT (backend)
// - TEST_PORT (vite dev server / static)
// - SERVER_PORT (backend API server)
// - PORT (Vite dev server / static file server)
// Guard against NaN from non-numeric environment variables
const parsedServerPort = Number.parseInt(process.env.PORT ?? '', 10);
const parsedStaticPort = Number.parseInt(process.env.TEST_PORT ?? '', 10);
const parsedServerPort = Number.parseInt(process.env.SERVER_PORT ?? '', 10);
const parsedStaticPort = Number.parseInt(process.env.PORT ?? '', 10);
export const DEFAULT_SERVER_PORT = Number.isFinite(parsedServerPort) ? parsedServerPort : 3008;
export const DEFAULT_STATIC_PORT = Number.isFinite(parsedStaticPort) ? parsedStaticPort : 3007;

View File

@@ -33,11 +33,11 @@
--input: oklch(0.98 0 0);
--ring: oklch(0.3 0 0);
--chart-1: oklch(0.3 0 0);
--chart-2: oklch(0.5 0 0);
--chart-3: oklch(0.4 0 0);
--chart-4: oklch(0.6 0 0);
--chart-5: oklch(0.35 0 0);
--chart-1: oklch(0.5 0.14 25); /* Warm red - strings, regex */
--chart-2: oklch(0.5 0.13 250); /* Blue - properties, variables */
--chart-3: oklch(0.55 0.13 145); /* Green - numbers */
--chart-4: oklch(0.45 0.14 300); /* Purple - keywords, booleans, tags */
--chart-5: oklch(0.5 0.12 180); /* Teal - types, classes */
--sidebar: oklch(0.98 0 0);
--sidebar-foreground: oklch(0.15 0 0);