feat(frontend): add max-messages input and message attributes to SQS … - #286
Ashish50514561 wants to merge 5 commits into
Conversation
|
| {receiving ? <Loader2 size={13} className="spin" /> : <Inbox size={13} />} | ||
| {receiving ? "Receiving" : "Receive messages"} | ||
| </button> | ||
| <div style={{display: "flex", alignItems: "center", gap: 8}}> |
There was a problem hiding this comment.
Unapproved panel layout change
The new horizontal control group changes the Receive panel’s layout and spacing. The repository requires an issue from an accepted Discussion for console layout or look-and-feel changes; that requirement must be satisfied before merging.
Context Used: AGENTS.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| // If a batch has less than 10 messages, SQS has exhausted its sampling. | ||
| // If it returns 10 but all of them are duplicates, no new messages were found. | ||
| // In either case, we stop polling instead of wasting requests. | ||
| if (batch.length < 10 || newMessagesCount === 0) { |
There was a problem hiding this comment.
If SQS returns fewer than 10 messages while more remain available, this new condition stops polling even when the requested count has not been reached. A request for 25 messages can therefore return only the first partial batch instead of continuing to collect available messages.
Knowledge Base Used: AWS cloud adapters
Summary
This PR improves the SQS Receive tab by allowing users to configure the number of messages they want to pull at once, and surfaces message metadata that the API already returns.
Specifically, it:
maxMessages = 10API call with a user-configurable number input field (1-100).attributesinside a collapsible<details>block on each message card if they exist.Type of change
fix:)feat:)feat!:orfix!:)Area
packages/frontend)packages/api)Verification
Verified locally using the full
docker composedev stack against the local Floci core emulator.fireEvent.changeinSqsMessagingPanel.test.tsxto handlejsdomnumber-input quirks.(I will attach a before/after screenshot of the UI below)
Checklist
pnpm lint,pnpm type-check,pnpm test, andpnpm buildpass locallybun testinpackages/api)