Skip to content

Fix regression in list hosts - #6

Merged
zwass merged 1 commit into
fleetdm:masterfrom
zwass:fix-list-hosts
Nov 4, 2020
Merged

Fix regression in list hosts#6
zwass merged 1 commit into
fleetdm:masterfrom
zwass:fix-list-hosts

Conversation

@zwass

@zwass zwass commented Nov 4, 2020

Copy link
Copy Markdown
Member

Changes in kolide/fleet#2327 broke the MySQL
syntax for listing hosts with online status. This was not caught due to
the lack of a unit test for the functionality. This PR adds a unit test
and fixes the regression.

Changes in kolide/fleet#2327 broke the MySQL
syntax for listing hosts with online status. This was not caught due to
the lack of a unit test for the functionality. This PR adds a unit test
and fixes the regression.
@zwass zwass added the bug Something isn't working as documented label Nov 4, 2020
@zwass
zwass merged commit 2e333a4 into fleetdm:master Nov 4, 2020
@zwass
zwass deleted the fix-list-hosts branch November 4, 2020 20:03
chiiph pushed a commit that referenced this pull request Aug 4, 2021
@zhumo zhumo mentioned this pull request Nov 30, 2022
@qa-wolf

qa-wolf Bot commented Mar 29, 2023

Copy link
Copy Markdown

🐛 QA Wolf - Deployment: Premium

Joel here: 123 tests ran, see details here.

🐛 5 bugs
✅ 118 passed

@qa-wolf

qa-wolf Bot commented Mar 29, 2023

Copy link
Copy Markdown

🐛 QA Wolf - Deployment: Free

Vippsi here: 72 tests ran, see details here.

🐛 3 bugs
✅ 69 passed

Sampfluger88 pushed a commit that referenced this pull request Mar 19, 2026
## Summary

- Adds `fleetdm/demo` as a documented exception (#6) to the "Why do we
use one repo?" section of the "Why this way?" handbook page.

This exception acknowledges that demo environments benefit from a
lightweight, standalone repository that can be cloned and run
independently.

---

Built for [Sam
Pfluger](https://fleetdm.slack.com/archives/D0AF8QFBVHB/p1773886197818949)
by [Kilo for Slack](https://kilo.ai/features/slack-integration)

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
TsekNet added a commit to TsekNet/fleet that referenced this pull request Mar 22, 2026
- Extract nested block to tryReuseExistingInstaller helper (fleetdm#5)
- Add 30s timeout to HEAD request client (fleetdm#2)
- Validate URL scheme (http/https only) for SSRF defense (fleetdm#1)
- Weak ETag comparison: strip W/ prefix per RFC 7232 (fleetdm#3)
- Validate ETag/Last-Modified format before storing (fleetdm#6)
- Move HTTPETag/HTTPLastModified into fillSoftwareInstallerPayloadFromExisting (fleetdm#9)
- Remove duplicate store-existence check (fleetdm#7)
- Add ORDER BY si.id DESC to LIMIT 1 query (fleetdm#8)
- Use ds.writer (primary) for GetInstallerByTeamAndURL (fleetdm#13)
- Rename checkURLChanged to hasURLContentChanged (fleetdm#11)
- Rename urlContentUnchanged to canSkipDownload (fleetdm#16)
- Add nil guard in mock to prevent panic in existing tests
- Fix schema.sql collation to match migration output
- Fix lint: use svc.logger instead of bare slog.Warn
- Add tests: weak ETag, both headers precedence, 403/500 status,
  non-HTTP scheme, normalizeETag, validETag (fleetdm#3,12,14,17)
- Document redirect limitation (fleetdm#15)
RachelElysia added a commit that referenced this pull request Jul 21, 2026
- (#4) Deep dive: drop the optional onAddFleet prop entirely rather
  than carrying a dead migration path. `browserHistory` is fine in
  frontend/components/ (used by AuthenticationNav and CommandPalette),
  so the fallback becomes the sole path — no dead code, no half-wired
  interface. Consumers that ever need to override navigation can add
  the prop back at that point.
- (#5) Add `aria-label="Search fleets"` to the search input — screen
  readers skip placeholder-as-label once the field has a value.
- (#6) Drop `name="fleet-search-input"` (not a form-submitted field)
  and add `autoComplete="off"` so browsers don't pop autofill
  suggestions on top of the option list.
- (#7) Rename `TeamsDropdown` -> `FleetsDropdown` in
  frontend/docs/patterns.md:459 (Fleet switcher reference).
- (#8) Use getPathWithQueryParams(PATHS.ADMIN_FLEETS, { create_fleet:
  "1" }) instead of the plain template string — matches the
  codebase's URL-construction convention.
RachelElysia added a commit that referenced this pull request Jul 22, 2026
  stale comment, side effects in state updater

- (#2) Rework the scroll-fade to a 0-height sticky anchor with an
  absolutely-positioned ::before pseudo-element toggled via opacity on
  a --visible modifier. The old approach mounted/unmounted a 35px
  sticky div, so MenuList.scrollHeight grew and shrank as the fade
  toggled — browsers can clamp scrollTop when scrollHeight shrinks,
  causing a visible jump near the end of the list. The anchor is
  always in the DOM at 0 flow height; scroll metrics stay stable.

- (#3) Chain react-select's own innerProps.onScroll and innerProps.
  onMouseDown before our custom logic. The previous spread-then-
  override pattern silently dropped whatever react-select provided,
  which could break its own scroll-to-highlighted-option or focus
  tracking on a future version.

- (#5) Fix stale comment on the hidden-input-focus useEffect. It said
  "CustomMenuList focuses the search input on mount," but the search
  input now lives in CustomMenu and uses native autoFocus. Corrected
  the comment to reflect where focus actually comes from.

- (#6) Move side effects (onOpen? / setSearchQuery) out of the
  setMenuIsOpen state updater in toggleMenu. React's Strict Mode
  double-invokes state updaters, which would double-fire onOpen and
  double-clear searchQuery. Reading menuIsOpen directly is safe — a
  single user click can't race with itself.
RachelElysia added a commit that referenced this pull request Jul 22, 2026
- (#1) preventDefault on Enter in addFleetKeyDown. Fleet Button's own
  handleKeyDown synthesizes onClick from Enter, so without preventDefault
  the browser ALSO synthesizes a native click after keyup, firing
  onClickAddFleet a second time. jsdom didn't catch this (it doesn't
  synthesize click from keyDown); the double-fire only manifests in a
  real browser. Space is left with stopPropagation only — Fleet Button
  has no Space handler, and native click synthesis is Space's only
  activation path.

- (#2) Dev-only console.warn in getHiddenInput() when
  SelectInstance.inputRef is unexpectedly missing. Surfaces a
  react-select upgrade breaking the keydown-forwarding bridge loudly
  in dev instead of silently regressing keyboard nav.

- (#4) Consolidate searchQuery clearing into the menuIsOpen transition
  effect. The same setSearchQuery("") was duplicated at 5 close origins
  (click-outside, toggleMenu, handleChange, onClickAddFleet,
  onMenuClose). All 5 removed; the transition effect is now the single
  source of truth for close-side state cleanup.

- (#6) Story decorator: height: 600 -> minHeight: 780. The old fixed
  height clipped scrollable-list stories when the open menu grew past
  600px; minHeight 780 (menu maxHeight 715 + trigger + margin) lets the
  full menu render without clipping.
RachelElysia added a commit that referenced this pull request Jul 29, 2026
- (#3) Deleted orphaned components/UploadListHeading/ folder — no
  external importers left after the tab-header refactor.
- (#4) ConfigurationProfiles: hide the __tab-header (description +
  Add button) when !mdmEnabled so the "Create and upload configuration
  profiles..." copy no longer contradicts the "MDM must be turned on"
  EmptyState directly below.
- (#5) Extracted the duplicated __tab-header block into a
  @mixin tab-header in styles/var/mixins.scss; six copies across five
  files now @include it.
- (#6) Comment on .profiles-tab explaining why ConfigurationProfiles
  splits its card wrapper from its per-tab layout (two inner tabs
  mirroring .assets-tab) while Certificates / ScriptLibrary stay
  single-block (one-tab card).
- (#7) Comment on <span className="controls"> in TableContainer.tsx
  flagging the load-bearing shape that _styles.scss's :has(.controls
  > *) collapse rule depends on.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working as documented

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant