Skip to content

Release TeamVault 3.3.0 - #19

Merged
TheStreamCode merged 13 commits into
mainfrom
release/3.3.0
Oct 11, 2026
Merged

TheStreamCode merged 13 commits into
mainfrom
release/3.3.0

Conversation

@TheStreamCode

Copy link
Copy Markdown
Owner

Summary

Release 3.3.0: governance hardening, a real-world ZIP export fix, user-facing error surfacing, folder search, a fully rebuilt regression suite, and structural cleanup of the admin app.

Security and governance

  • Permission-rule management is restricted to administrators or users whose manage grant comes from an explicit folder rule; the capability-based free fallback no longer delegates rule management, and the interface hides the rule editor via a can_manage_rules flag (verified live against a capability-holding editor: 403 + no permissions button)
  • ZIP exports build their temporary archive through a correctly separated temp directory path — wp_tempnam() concatenates the provided directory as-is and the untrailed sys_get_temp_dir() produced malformed paths that broke exports (found during live staging QA; the old test shim masked it; the shim now mirrors core and the regression test fails against the previous construction)
  • The audit CSV action filter travels as log_action, no longer overwriting the admin-post routing parameter (previously broke the export whenever a filter was active)
  • Localized strings and server-derived enum values reaching HTML attributes are escaped mechanically; the runtime payload no longer ships repository-only metadata files

User-facing fixes

  • Delete/rename/move failures surface the specific server message instead of a generic error (closes the support report about "generic errors" on folder deletion); expired sessions get a dedicated reload hint
  • Uploads rejected for a content/extension mismatch explain the detected content type and the declared extension (closes the ".doc from email" support report)
  • Search returns matching folders alongside files, honoring the view scope

Admin app

  • Bundled translations defer to installed GlotPress language packs (fallback only)
  • Double-submit guards on modal confirms, stale-response guards on user searches, serialized upload batches, Escape closes context menus, honest export feedback, no stale content after a failed folder load
  • Shared factories: bindUserSearch, showTextPromptModal, buildContextMenu; pure helpers module with behavioral node tests

Tests and release alignment

  • Suite grows from 135 to 186 PHPUnit tests (view escaping, nonce rejection, REST permission wiring, admin handler guards, i18n runtime, governance rule management, export temp path) plus 11 node tests for the shared helpers; faithful WordPress shims replace the masking ones
  • POT regenerated with wp-cli i18n; all release artifacts aligned and enforced by PDMReleaseMetadataTest (changelog, upgrade notice, localized READMEs, security review, CITATION.cff)

Verification performed

  • PHPUnit 11.5.56 on PHP 8.3 (186/640 green), PHP lint 83 files, node 33/33
  • Live HTTP QA on a WordPress 7.1.3 staging site: upload, preview, download (byte-identical, security headers), REST, per-folder permissions, ZIP export, audit CSV, maintenance tools, full uninstall cleanup
  • WordPress Plugin Check: 0 errors
  • Scripted browser QA (Playwright): 14/14 checks green, no unexpected JS errors

Generated by Mistral Vibe.

TheStreamCode and others added 13 commits October 11, 2026 21:17
…views, REST wiring and i18n runtime

- tests/bootstrap.php: faithful esc_* / form / redirect / locale shims, filter-aware apply_filters, action-recording nonce shims, REST route registration capture, view-capable globals
- New PDMViewsEscapingTest, PDMNonceRejectionTest, PDMRestRouteRegistrationTest, PDMI18nRuntimeTest, PDMAdminHandlersTest cover the previously untested view layer, rejection paths, REST permission wiring, runtime gettext fallback and admin handler guards
- Replace the source-text assertion for the interface-language allowlist with behavioral coverage

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
WordPress core concatenates the directory passed to wp_tempnam() as-is,
so sys_get_temp_dir() (no trailing slash) produced malformed temp paths
such as ".../TempQA-Folder-x.tmp", breaking folder and library ZIP
exports whenever the path could not be touched. Pass trailing-slashed
directories instead, align the wp_tempnam() test shim with core
naming (direct concatenation, .tmp suffix), and add a regression test
that fails against the previous path construction.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
…lder search

- Permission rules are now manageable only by administrators or users whose
  manage grant comes from an explicit folder rule; the capability-based free
  fallback no longer delegates rule management (governance REST guard plus
  a can_manage_rules flag consumed by the folder details panel)
- The bundled gettext fallback map now only applies when no GlotPress
  language pack translation is available
- Search returns matching folders alongside files, honoring the view scope

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
…ey, clarify MIME mismatch, make logs pagination translatable

- Delete/rename/move failures now show the server-provided message (API
  errors are marked so network failures still fall back to the generic
  localized string); closes the generic-error report from support
- The reports action filter travels as log_action so it can no longer
  overwrite the admin-post routing parameter (previously broke the audit
  CSV export whenever an action filter was active)
- Upload rejection explains content/extension mismatches instead of the
  generic "file type not allowed" (the .doc case reported via support)
- Logs pagination uses complete translatable sentences; bundled map
  translations added for en fallback in it/fr/es/de

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
…sessions

- Modal confirm buttons share a double-submit guard and disable while in flight
- All debounced user searches drop stale responses via a sequence counter
- Concurrent upload batches are serialized with an isUploading guard
- A failed folder load clears the stale items instead of showing the previous
  folder under the new heading; search resets the toolbar permission map
- Escape closes context menus; expired REST nonces surface a dedicated
  session-expired message; the export toast reports the started export
  instead of a fake success

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
…and docs

- Localized strings reaching HTML attributes and governance enum fallbacks
  are escaped mechanically; user-search tags normalize IDs; the preview
  download binding is null-guarded
- Drop the unused adminUrl/allowedExtensions localized payload; stop
  double-escaping the settings submit button (core already escapes it)
- Exclude CITATION.cff and COPYRIGHT.md from the Plugin Check payload
  (the only warning raised by WordPress Plugin Check)
- Regenerate-aligned POT: add the new strings, drop the obsolete ones
- readme FAQ: role access paths, content/extension mismatch rejections,
  empty-folder deletion, and the tightened permission-rule management

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- New assets/js/admin-app-helpers.js exposes dependency-free
  escapeHtml/buildApiUrl/normalizeSameOriginUrl; the app methods delegate to it
- New tests/pdm-helpers.test.mjs covers the helper behavior with node --test
  (11 tests), replacing the tautological source-text assertions for the
  escaper, the URL builder and the same-origin normalizer; remaining
  source checks now assert the wiring and the browser sinks only
- CI and AGENTS.md run the new syntax check and test command

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
…ch helper

- New bindUserSearch in admin-app-core.js owns debounce, the stale-response
  sequence guard, rendering and result-click dispatch; call sites provide
  render/renderEmpty/onShown/onPick
- Governance permissions, groups, quotas and notifications plus the settings
  whitelist now route through the widget (single users/search call site);
  regression assertions updated to guard the wiring

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Create-folder, rename-folder and rename-file modals share one
showTextPromptModal implementation (title, initial value, confirm handler
through the double-submit guard); the per-item modals are now thin
wrappers, and the regression assertion counts the three remaining
bindModalConfirm call sites.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
…ctory

buildContextMenu renders items, clamps the menu inside the viewport and
dispatches clicks; the shared SVG icons live in contextMenuIcon; the
folder and file menus are now declarative item lists (the file download
item keeps its disabled state when the binary is missing).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Replace the hand-maintained template with one generated by
`wp i18n make-pot` (WP-CLI 2.12.0): correct line references, the
standard plugin-header metadata entries, and the proper package
slug in Report-Msgid-Bugs-To. Every bundled map key is covered.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
The item key is emitted as a pdm-context-<key> class alongside the
data-context-action attribute, preserving the pre-refactor class names
(open, preview, download, rename, move, delete) for consumers.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Bump the version and align every release artifact: plugin header and
constant, readme stable tag with changelog and upgrade notice, dated
changelog.txt entry, GitHub and localized README version lines with
release notes, the dated security review covering this cycle's findings
(SEC-005..008), the CITATION.cff version and release date, and the POT
project version. The upgrade notice calls out the only behavior change:
permission-rule management now requires an explicit manage grant.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
@TheStreamCode
TheStreamCode merged commit 4149c4c into main Oct 11, 2026
14 checks passed
@TheStreamCode
TheStreamCode deleted the release/3.3.0 branch October 11, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant