Skip to content

fix(frontend): prevent stale JSON copy feedback - #285

Merged
fredpena merged 1 commit into
floci-io:mainfrom
snowyukitty:fix/clipboard-selection-280
Oct 4, 2026
Merged

fredpena merged 1 commit into
floci-io:mainfrom
snowyukitty:fix/clipboard-selection-280

Conversation

@snowyukitty

Copy link
Copy Markdown
Contributor

Summary

  • Keep JSON copy confirmation attached to the selected resource or storage object when an earlier clipboard write resolves later.
  • Clear the confirmation timer when selection changes or the inspector unmounts. A repeated copy restarts the 1.5-second feedback interval.
  • Add regression coverage for pending writes, overlapping copies, and timer restart.

Closes #280

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

  • The two pending-selection tests fail against the audited base and pass with this fix.
  • In a contained Node 22 Linux environment, frontend ESLint, both frontend TypeScript checks, the full Vitest suite, and the production TypeScript/Vite build pass. The package commands were run through their installed binaries with a single Vitest worker because Windows bind-mounted dependencies timed out during worker startup.
  • API TypeScript check passes; bun test passes 1,455 tests across 68 files in a contained Bun 1.3.14 environment.
  • No cloud runtime was needed for this clipboard-state behavior. The patch changes no layout or visual styling, so static before/after screenshots would show the same controls.

Checklist

  • Equivalent package lint, type-check, test, and build commands pass in isolated containers
  • New regression tests added
  • No fake operational data added
  • Conventional Commit title and commit message
  • No layout or look-and-feel change
  • I have no more than 2 open, non-draft pull requests in this repository

@greptile-apps

greptile-apps Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Fixes stale feedback state when switching resources during copy.

This PR appears safe to merge; no actionable issues were found.

What we checked:

  • Old copies confirm new selections: Selection changes invalidate the pending request before its completion can set copiedJson.
  • Earlier copies change newer feedback: Each copy replaces the current request and clears the previous timer. Late writes and failures cannot change newer feedback.
Summary

This PR keeps JSON copy feedback tied to the selected resource or storage object.

  • Pending writes cannot confirm a copy after selection changes or unmount.
  • Repeated copies restart the 1.5-second feedback timer.
  • Four regression tests cover selection changes, overlapping writes, and timer restart.
  • Tests were inspected, not run during this review.
  • Adding greptile_confidence was attempted but blocked by missing GitHub authentication.

Reviews (1) · Last reviewed commit: "fix(frontend): prevent stale JSON copy f..."

@fredpena fredpena added the floci-core Console core: shell, UI framework, CI, docs, deps (not tied to an emulator or cloud) label Oct 3, 2026
@fredpena

fredpena commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Thank you, @snowyukitty, this is a careful fix for #280.

The request token plus clearing the timer on selection change and unmount covers everything the issue asked for.

No blockers from my side.

@fredpena
fredpena merged commit f23c0e4 into floci-io:main Oct 4, 2026
7 checks passed
@hectorvent

Copy link
Copy Markdown
Member

🎉 This PR is included in version 0.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Ashish50514561 pushed a commit to Ashish50514561/floci-ui that referenced this pull request Oct 8, 2026
# [0.6.0](floci-io/floci-ui@0.5.0...0.6.0) (2026-10-08)

### Bug Fixes

* **appconfig:** isolate account-scoped panel state ([floci-io#234](floci-io#234)) ([8c4fcbc](floci-io@8c4fcbc))
* **ci:** run frontend vitest suite in pnpm test ([floci-io#244](floci-io#244)) ([da035ce](floci-io@da035ce)), closes [floci-io#238](floci-io#238) [floci-io#214](floci-io#214)
* **docker:** provide curl for multicloud seed container ([floci-io#231](floci-io#231)) ([f3d23cf](floci-io@f3d23cf))
* **ec2:** serialize networking and instance request bodies once ([floci-io#245](floci-io#245)) ([82f2c20](floci-io@82f2c20)), closes [floci-io/floci#2089](floci-io/floci#2089) [floci-io/floci#2094](floci-io/floci#2094)
* **ec2:** serialize security group creation requests once ([floci-io#228](floci-io#228)) ([c1eff90](floci-io@c1eff90))
* **frontend:** meet WCAG AA contrast and fix console visual accessibility ([floci-io#224](floci-io#224)) ([71f70bc](floci-io@71f70bc))
* **frontend:** prevent stale JSON copy feedback ([floci-io#285](floci-io#285)) ([f23c0e4](floci-io@f23c0e4)), closes [floci-io#280](floci-io#280)
* **layout:** wire topbar search input to search query param ([floci-io#205](floci-io#205)) ([floci-io#206](floci-io#206)) ([b277694](floci-io@b277694))
* **networking:** reject duplicate Azure VNet creates and validate subnet containment ([floci-io#246](floci-io#246)) ([ed60495](floci-io@ed60495)), closes [floci-io#166](floci-io#166)

### Features

* **api:** add SageMaker AI ([floci-io#236](floci-io#236)) ([3eb4449](floci-io@3eb4449))
* **appconfig:** add AWS AppConfig explorer for applications and deployments ([floci-io#220](floci-io#220)) ([65591cf](floci-io@65591cf)), closes [floci-io#215](floci-io#215)
* **appconfig:** edit the current configuration and publish it as a new version ([floci-io#260](floci-io#260)) ([99239c4](floci-io@99239c4))
* **azure:** add Azure Functions to Cloud Explorer ([floci-io#292](floci-io#292)) ([94003e8](floci-io@94003e8)), closes [floci-io#91](floci-io#91)
* **azure:** add Event Hubs to Cloud Explorer ([floci-io#291](floci-io#291)) ([c113583](floci-io@c113583))
* **azure:** add Queue Storage to Cloud Explorer ([floci-io#275](floci-io#275)) ([96964e3](floci-io@96964e3))
* **azure:** add Table Storage to Cloud Explorer ([floci-io#276](floci-io#276)) ([01c6044](floci-io@01c6044))
* **cloud:** add 'containers' to KnownCloudServiceType ([floci-io#248](floci-io#248)) ([05a9e97](floci-io@05a9e97)), closes [floci-io#73](floci-io#73)
* **cloudwatch:** add metric alarms to Cloud Explorer ([floci-io#284](floci-io#284)) ([1c50881](floci-io@1c50881))
* **cognito:** add user pools to Cloud Explorer ([floci-io#251](floci-io#251)) ([92c1a11](floci-io@92c1a11)), closes [floci-io#82](floci-io#82)
* **docker:** make container socket path configurable for Podman ([floci-io#287](floci-io#287)) ([1541243](floci-io@1541243))
* **frontend:** add max-messages input and message attributes to SQS ([floci-io#286](floci-io#286)) ([0a095f4](floci-io@0a095f4))
* **frontend:** describe cloud services in console ([floci-io#257](floci-io#257)) ([990d6f7](floci-io@990d6f7))
* **frontend:** follow system color scheme in settings ([floci-io#259](floci-io#259)) ([c476730](floci-io@c476730)), closes [floci-io#258](floci-io#258)
* **frontend:** move cloud and account controls to settings ([floci-io#258](floci-io#258)) ([bcc33f3](floci-io@bcc33f3)), closes [floci-io#259](floci-io#259)
* **frontend:** move cloud selector into header, drop redundant provider banner ([floci-io#240](floci-io#240)) ([6af3b4e](floci-io@6af3b4e))
* **frontend:** move database data explorers to dedicated pages ([floci-io#219](floci-io#219)) ([ea6a8e6](floci-io@ea6a8e6))
* **frontend:** move theme switch to Settings → Appearance page ([floci-io#216](floci-io#216)) ([16a0a7c](floci-io@16a0a7c)), closes [floci-io#213](floci-io#213)
* **frontend:** restore the light/dark toggle in the top bar ([floci-io#270](floci-io#270)) ([1e37338](floci-io@1e37338)), closes [floci-io#216](floci-io#216) [floci-io#271](floci-io#271) [floci-io#261](floci-io#261)
* **frontend:** support multi-resource selection and horizontal table action buttons ([floci-io#235](floci-io#235)) ([b1917e5](floci-io@b1917e5))
* **gcp:** add Firestore to Cloud Explorer ([floci-io#294](floci-io#294)) ([3325613](floci-io@3325613)), closes [floci-io#97](floci-io#97)
* **identity:** add IAM roles and policies alongside users ([floci-io#249](floci-io#249)) ([be00cd3](floci-io@be00cd3)), closes [floci-io#162](floci-io#162)
* **kinesis:** add streams to Cloud Explorer ([floci-io#229](floci-io#229)) ([cf78341](floci-io@cf78341)), closes [floci-io#87](floci-io#87)
* **kms:** add encrypt and decrypt panel ([floci-io#232](floci-io#232)) ([b1fa147](floci-io@b1fa147)), closes [floci-io#70](floci-io#70)
* **logs:** add a CloudWatch Logs streams/events drill-down on the child-collections SPI ([floci-io#222](floci-io#222)) ([99d8d38](floci-io@99d8d38)), closes [floci-io#179](floci-io#179) [floci-io#170](floci-io#170) [floci-io#179](floci-io#179) [floci-io#179](floci-io#179)
* **logs:** add a cross-log-group Logs Insights tab ([floci-io#242](floci-io#242)) ([ebed4b5](floci-io@ebed4b5))
* **logs:** add a Logs Insights query panel to the CloudWatch Logs explorer ([floci-io#226](floci-io#226)) ([c1888af](floci-io@c1888af))
* **messaging:** add SQS send, receive, delete, and purge operations ([floci-io#272](floci-io#272)) ([40d4d8c](floci-io@40d4d8c)), closes [floci-io#148](floci-io#148) [floci-io#157](floci-io#157)
* **oci:** add Functions to Cloud Explorer ([floci-io#268](floci-io#268)) ([45da66b](floci-io@45da66b)), closes [floci-io#267](floci-io#267)
* **oci:** add Identity to Cloud Explorer ([floci-io#263](floci-io#263)) ([b17a303](floci-io@b17a303)), closes [floci-io#262](floci-io#262)
* **oci:** add OCI provider with Object Storage ([floci-io#262](floci-io#262)) ([4f4a532](floci-io@4f4a532))
* **oci:** add OKE to Cloud Explorer ([floci-io#269](floci-io#269)) ([5e351c9](floci-io@5e351c9)), closes [floci-io#268](floci-io#268)
* **oci:** add Queue to Cloud Explorer ([floci-io#264](floci-io#264)) ([d84a60e](floci-io@d84a60e)), closes [floci-io#263](floci-io#263)
* **oci:** add Streaming to Cloud Explorer ([floci-io#265](floci-io#265)) ([1bc5d11](floci-io@1bc5d11)), closes [floci-io#264](floci-io#264)
* **oci:** add Vault keys to Cloud Explorer ([floci-io#266](floci-io#266)) ([4079ddd](floci-io@4079ddd)), closes [floci-io#265](floci-io#265)
* **oci:** add Vault secrets to Cloud Explorer ([floci-io#267](floci-io#267)) ([6de2fa6](floci-io@6de2fa6)), closes [floci-io#266](floci-io#266)
* **serverless:** add lambda trigger registration and inspector management for AWS ([floci-io#250](floci-io#250)) ([94fbace](floci-io@94fbace))
* **sns:** add topics to Cloud Explorer ([floci-io#274](floci-io#274)) ([b55a11b](floci-io@b55a11b))
* **ui:** add Plain Text, JSON, and Table view tabs with JSON copy to Resource Side panel ([floci-io#273](floci-io#273)) ([066f257](floci-io@066f257))
* **workflows:** add an execution history viewer for Step Functions ([floci-io#227](floci-io#227)) ([0df9336](floci-io@0df9336)), closes [floci-io#74](floci-io#74) [floci-io#167](floci-io#167) [floci-io#170](floci-io#170) [floci-io#222](floci-io#222) [floci-io#74](floci-io#74) [floci-io#74](floci-io#74) [floci-io#167](floci-io#167)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

floci-core Console core: shell, UI framework, CI, docs, deps (not tied to an emulator or cloud) released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(frontend): a pending clipboard write can show "Copied" on the wrong resource

3 participants