Skip to content
Merged
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
2 changes: 1 addition & 1 deletion apps/web/core/components/issues/title-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const IssueTitleInput = observer(function IssueTitleInput(props: IssueTit
} = props;
const { t } = useTranslation();
// states
const [title, setTitle] = useState("");
const [title, setTitle] = useState(value || "");
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

This introduces derived state from a prop: if value changes after mount (e.g., async load / store hydration), title won’t update and the input can stay stale. Consider syncing title when value changes (e.g., in an effect gated by hasUnsavedChanges.current), or making the input fully controlled by value (and removing local title state) to avoid inconsistencies.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

Prefer nullish coalescing for defaulting optional props: value || \"\" will also fall back for other falsy values. Using value ?? \"\" is a more precise default for null/undefined.

Copilot uses AI. Check for mistakes.
const [isLengthVisible, setIsLengthVisible] = useState(false);
// ref to track if there are unsaved changes
const hasUnsavedChanges = useRef(false);
Expand Down
Loading