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
1 change: 1 addition & 0 deletions apps/mobile/src/components/ProjectKnowledgeFactEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export function ProjectKnowledgeFactEditor(props: {
tags !== (base?.tags.join(", ") ?? "") ||
kind !== (base?.kind ?? "note");
const { onDirtyChange } = props;
// oxlint-disable-next-line t3code/no-unreasoned-state-sync -- keeps the parent's leave guard in step, including pre-filled drafts, and releases it on unmount
useEffect(() => {
onDirtyChange(dirty);
return () => onDirtyChange(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export function CodeExplorerDialogHost(props: {
readonly projectId: ProjectId;
}) {
const [request, setRequest] = useAtom(codeExplorerRequestAtom);
// oxlint-disable-next-line t3code/no-unreasoned-state-sync -- clears the keep-alive request atom on unmount so a stale request cannot reopen the dialog
useEffect(() => () => setRequest(null), [setRequest]);
const active =
request !== null &&
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/components/loom/LoomMinimap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export function LoomMinimap(props: {
}) {
const ref = useRef<HTMLDivElement>(null);
const [width, setWidth] = useState(0);
// oxlint-disable-next-line t3code/no-unreasoned-state-sync -- subscribes to this element's size through a ResizeObserver
useLayoutEffect(() => {
const element = ref.current;
if (element === null) return;
Expand Down
2 changes: 2 additions & 0 deletions apps/web/src/components/loom/LoomTimeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export interface LoomTimelineProps {
function useElementWidth() {
const ref = useRef<HTMLDivElement>(null);
const [width, setWidth] = useState(0);
// oxlint-disable-next-line t3code/no-unreasoned-state-sync -- subscribes to this element's size through a ResizeObserver
useLayoutEffect(() => {
const element = ref.current;
if (element === null) return;
Expand All @@ -78,6 +79,7 @@ export function LoomTimeline(props: LoomTimelineProps) {
const scale = loomScale(props.view, timelineWidth);
const asOfMs = Date.parse(props.window.asOf);

// oxlint-disable-next-line t3code/no-unreasoned-state-sync -- subscribes to the scroller's height through a ResizeObserver to window visible rows
useLayoutEffect(() => {
const element = scrollRef.current;
if (element === null) return;
Expand Down
3 changes: 2 additions & 1 deletion apps/web/src/components/loom/LoomWeaveField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export interface LoomWeaveFieldProps {
function useElementSize() {
const ref = useRef<HTMLDivElement>(null);
const [size, setSize] = useState({ width: 0, height: 0 });
// oxlint-disable-next-line t3code/no-unreasoned-state-sync -- subscribes to this element's size through a ResizeObserver
useLayoutEffect(() => {
const element = ref.current;
if (element === null) return;
Expand Down Expand Up @@ -452,7 +453,7 @@ function BranchLayer(
const labelRoom = laneLabelRoom(paths, layout, width);
const rootY = layout.cy;
const { scrollRef } = props;
// A workstream taller than the field opens scrolled to its root, not to its topmost branch.
// oxlint-disable-next-line t3code/no-unreasoned-state-sync -- sets the DOM scroll position so a tall workstream opens on its root, not its topmost branch
useLayoutEffect(() => {
const element = scrollRef.current;
if (element !== null) element.scrollTop = Math.max(0, rootY - element.clientHeight / 2);
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/loom/useLoomViewGestures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function useLoomViewGestures(args: {
onViewChange(panLoomView(view, bounds, delta * scale.msPerPx));
}
});
// Wheel zoom needs preventDefault, which React's passive wheel listener cannot do.
// oxlint-disable-next-line t3code/no-unreasoned-state-sync -- attaches a non-passive wheel listener, since React's passive one cannot preventDefault for zoom
useEffect(() => {
const element = wheelRef.current;
if (element === null) return;
Expand Down
Loading