fix: CI Prettier, P1-6 poll button, P1-11 stale knock state

- LOTUS_TODO.md: Prettier formatting (CI gate fix)
- P1-6: Wire PollCreator into RoomInput — poll button (Icons.OrderList)
  opens modal, renders PollCreator when pollOpen is true
- P1-11: Reset knocked + knockError on room.roomId change via useEffect;
  add missing useEffect import to RoomIntro.tsx

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-03 00:14:55 -04:00
parent 8c2f0a7bee
commit 7cf751a3a5
3 changed files with 32 additions and 14 deletions
+13
View File
@@ -121,6 +121,7 @@ import { useRoomCreatorsTag } from '../../hooks/useRoomCreatorsTag';
import { usePowerLevelTags } from '../../hooks/usePowerLevelTags';
import { useComposingCheck } from '../../hooks/useComposingCheck';
import { VoiceMessageRecorder } from '../../components/VoiceMessageRecorder';
import { PollCreator } from './PollCreator';
const GifPicker = React.lazy(() =>
import('../../components/GifPicker').then((m) => ({ default: m.GifPicker })),
@@ -154,6 +155,7 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
useEffect(() => {
setCharCount(0);
}, [roomId]);
const [pollOpen, setPollOpen] = useState(false);
const alive = useAlive();
const [msgDraft, setMsgDraft] = useAtom(roomIdToMsgDraftAtomFamily(roomId));
@@ -952,6 +954,16 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
<Icon src={Icons.SpaceGlobe} size="100" />
)}
</IconButton>
<IconButton
onClick={() => setPollOpen(true)}
aria-label="Create poll"
variant="SurfaceVariant"
size="300"
radii="300"
title="Create poll"
>
<Icon src={Icons.OrderList} size="100" />
</IconButton>
<VoiceMessageRecorder
onSend={handleVoiceSend}
onError={(err) => {
@@ -995,6 +1007,7 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
)
}
/>
{pollOpen && <PollCreator room={room} roomId={roomId} onClose={() => setPollOpen(false)} />}
</div>
);
},