Repository navigation
Give the import page a way in on a desktop - #8
Merged
Merged
Conversation
With OpenStation active the Forms admin menu is not registered -- every surface is reached through the dock tile instead -- so the import page, which has no native window and had no dock row, existed at a URL nobody could navigate to. The feature shipped unreachable on exactly the sites it was built for. The tile gains an "Import forms" row: the one row carrying a real `url` rather than a callback, because the shell opens such a row as a window of its own, and an admin page whose buttons POST is the wrong shape for a native window rendering into the shell's DOM. Gated on the same capability as the builder, and on there being an admin URL in the config to point at. Found by running the plugin on the desktop site it integrates with, rather than on a bare WordPress. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0119U4sRRWGcTQdwYreTwpAp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A bug in the importers I just shipped, found by running the plugin on the OpenStation desktop site it is built to integrate with rather than on a bare WordPress install.
The bug
With the shell active,
atf_register_admin_pages()deliberately does not register the Forms admin menu — every surface is reached through the dock tile, and a menu would put a second, duplicate tile in the dock. Each of those surfaces has a native window, so nothing is lost.The import page is the exception: it has no native window, and it had no dock row. So on a desktop site, Forms → Import existed at a URL nobody could navigate to — no menu entry, no tile row, no icon. The feature shipped unreachable on exactly the sites it was written for.
The fix
The dock tile gains an
Import formsrow. It is the only row that carries a realurlinstead of anonSelectcallback, and that is deliberate: the shell's own contract says a row with a real URL "stays the fallback for anything that can express itself as one", opening it as a window of its own. The import page is one of those things — a server-rendered page whose buttonsPOSTtoadmin-post.php, which is the right shape for a one-time migration and the wrong shape for a native window rendering into the shell's DOM.Gated on
canEdit, same as the builder and Themes rows, and on there being anadminUrlin the config blob to point at — rather than a row that opensundefinedadmin.php.Verified on the desktop, not in the abstract
admin-post.phpPOST and its redirect staying inside the window. The stored schema came out right — five fields with their labels,{site} "{field:f3}"as the subject,{field:f2}as reply-to, confirmation and submit label carried over.submenuFor()(offered to editors, carries a URL and no callback, absent without the capability, absent without an admin URL). Suites: 246 vitest + 556 PHPUnit, all green.tscclean.docs/architecture.mdgains a short section on why Import is the one page with no native window, so the next person does not "fix" it into one.🤖 Generated with Claude Code
https://claude.ai/code/session_0119U4sRRWGcTQdwYreTwpAp