Skip to content

feat(frontend): add max-messages input and message attributes to SQS … - #286

Open
Ashish50514561 wants to merge 5 commits into
floci-io:mainfrom
Ashish50514561:feat/sqs-purge-and-poll
Open

Ashish50514561 wants to merge 5 commits into
floci-io:mainfrom
Ashish50514561:feat/sqs-purge-and-poll

Conversation

@Ashish50514561

Copy link
Copy Markdown

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:

  • Replaces the hardcoded maxMessages = 10 API call with a user-configurable number input field (1-100).
  • Adds a clear label indicating "Max (up to 100)".
  • Displays a count badge showing how many messages were received.
  • Renders attributes inside a collapsible <details> block on each message card if they exist.

Type of change

  • Bug fix (fix:)
  • New feature / service UI (feat:)
  • Breaking change (feat!: or fix!:)
  • Docs / chore

Area

  • Frontend (packages/frontend)
  • API / Cloud Proxy (packages/api)
  • Cloud Explorer adapter / schema
  • Build / CI / Docker

Verification

Verified locally using the full docker compose dev stack against the local Floci core emulator.

  • Successfully polled messages and observed the correct count being requested from the proxy.
  • Replaced select input testing with fireEvent.change in SqsMessagingPanel.test.tsx to handle jsdom number-input quirks.
  • All 75 frontend tests pass.

(I will attach a before/after screenshot of the UI below)

Checklist

  • pnpm lint, pnpm type-check, pnpm test, and pnpm build pass locally
  • New or updated tests added where it makes sense (bun test in packages/api)
  • No fake/mock data added — unwired states stay empty or show an explicit placeholder
  • Commit messages / PR title follow Conventional Commits
  • Layout or look-and-feel changes close an issue that came from an accepted Discussion (UI and Design Changes), or this PR has none (new services through the existing views, bug fixes that restore the intended layout, and accessibility fixes are exempt)
  • I have no more than 2 open, non-draft pull requests in this repository (maintainers and dependency bots are exempt).

@greptile-apps

greptile-apps Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 3/5

[Medium risk] Adds configurable message batch size to SQS receive operations.

The PR does not appear safe to merge until receive sampling handles short batches and the outstanding panel-layout requirement is addressed.

Findings

  1. P1 Short batches stop receiving ▶
  2. P2 Unapproved panel layout change ▶
Summary

The PR adds a configurable SQS receive limit, message counts, and expandable attributes, with API batching and tests.

  • The latest batching change stops on a short response even when the requested count has not been reached.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  UI[Receive limit] --> Route[Validate 1–100]
  Route --> Adapter[Request SQS batches of 10]
  Adapter --> Check{Batch smaller than 10?}
  Check -- Yes --> Return[Return collected messages]
  Check -- No --> Continue[Continue until limit or duplicate-only batch]
Loading

Reviews (5) · Last reviewed commit: "fix: always fetch max 10 messages and st..."

Comment thread packages/frontend/src/components/SqsMessagingPanel.tsx Outdated
Comment thread packages/frontend/src/components/SqsMessagingPanel.tsx Outdated
Comment thread packages/frontend/src/components/SqsMessagingPanel.tsx Outdated
Comment thread packages/frontend/src/components/SqsMessagingPanel.test.tsx Outdated
Comment thread packages/api/src/adapter-aws/AwsSqsAdapter.ts
Comment thread packages/api/src/adapter-aws/AwsSqsAdapter.ts Outdated
Comment thread packages/api/src/adapter-aws/AwsSqsAdapter.ts Outdated
Comment thread packages/api/src/adapter-aws/AwsSqsAdapter.ts Outdated
{receiving ? <Loader2 size={13} className="spin" /> : <Inbox size={13} />}
{receiving ? "Receiving" : "Receive messages"}
</button>
<div style={{display: "flex", alignItems: "center", gap: 8}}>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 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!

Comment thread packages/api/src/adapter-aws/AwsSqsAdapter.ts Outdated
// 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) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Short batches stop receiving

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

@fredpena fredpena added aws-sqs AWS SQS floci-core Console core: shell, UI framework, CI, docs, deps (not tied to an emulator or cloud) aws Amazon Web Services (Floci core) and removed floci-core Console core: shell, UI framework, CI, docs, deps (not tied to an emulator or cloud) labels Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aws Amazon Web Services (Floci core) aws-sqs AWS SQS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants