Skip to content

Give staff hub Create and View distinct compose and list URLs - #209

Merged
apescic-director merged 3 commits into
mainfrom
bmurphy/fix-136-hub-create-view-urls-63e9
Sep 14, 2026
Merged

apescic-director merged 3 commits into
mainfrom
bmurphy/fix-136-hub-create-view-urls-63e9

Conversation

@apescic-director

@apescic-director apescic-director commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Fixes #136

Staff service hubs showed Create and View in “what you can do” / Quick links, but both used the same index URL. Staff could not tell compose from browse. The Shelter Pet Profiles label also implied /shelter/pet-profiles, which 404s; the live list is /shelter/pets.

What this changes

  • Hub View links go to the live list (#list)
  • Hub Create links go to the compose form (#create)
  • The Pet Profiles hub label links to /shelter/pets#list, not /shelter/pet-profiles
  • /shelter/pet-profiles and /petcare/pet-profiles redirect to the live pets list
  • Service index pagination keeps #list so page 2+ stays on the list
  • #create / #list use a scroll offset under the sticky mobile header
  • Applies across APES CIC, Shelter, and Pet Care staff service hubs
  • Signed-in dashboard summary cards are unchanged (public own-record hubs stay out of scope until [Task] Create a live public local test account #129)

Out of scope

Tests

  • ServiceHubQuickLinksTest pins Create ≠ View URLs, Shelter pets path, alias redirects, hidden Create without permission, and pagination #list
  • ModuleAdministrationAndNavigationTest now asserts the Shelter pets list route on the hub
  • ModuleStateMiddlewareTest covers the pet-profiles alias routes
  • Version-pinned changelog, health, and rollback contract tests updated for v0.33.0
  • php artisan myapes:changelog-validate --base-ref=origin/main passed on the PR branch
  • Focused PHPUnit (ServiceHubQuickLinks, ModuleAdministrationAndNavigation, ModuleStateMiddleware, ReleaseHistoryCommand, ChangeLogPage, HealthAndTheme, ModuleRollbackCompatibility, ProductionUpgradePreflight) passed
  • npm run test:frontend and npm run build passed

composer pre-pr-verify was not run as the Composer script (PowerShell). The Linux equivalent contract gate above was run instead. Full bootstrap.sh --seed and a live browser preview were not started in this environment; verification is route- and test-based.

Release metadata

This PR includes v0.33.0 (VERSION, resources/data/releases.json, resources/data/module-runtime-contract.json). This is the first Staff UX ship (minor).

Open in Web Open in Cursor 

Staff could not tell create from browse because both hub actions used the same index route, and the Pet Profiles label implied /shelter/pet-profiles which 404s.

Co-authored-by: APES Director <apescic-director@users.noreply.github.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-13T06:27:56.315985Z ab71cf2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This is the first Staff UX ship, so the hub navigation fix opens the 0.33.x line in the same PR as the work.

Co-authored-by: APES Director <apescic-director@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ab71cf2ebf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +17 to +19
public function viewUrl(): string
{
return route($this->routeName).'#list';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add the required release metadata

This feature commit leaves VERSION, resources/data/releases.json, resources/data/module-runtime-contract.json, and the version-pinned tests unchanged from its main parent. On the pull request, .github/workflows/test-cloudron.yml runs myapes:changelog-validate against the base SHA, so validateAppendOnly() will report that exactly one release record must be prepended and block CI. Include the synchronized v0.33.0 release metadata in this change.

AGENTS.md reference: AGENTS.md:L87-L89

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

v0.33.0 metadata is already on this PR in 20837ba (VERSION, releases.json, module-runtime-contract.json, and the version-pinned tests). CI on that commit was green. The review was against the earlier feature-only commit ab71cf2.


public function viewUrl(): string
{
return route($this->routeName).'#list';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Offset fragment targets below the mobile header

On viewports at or below 64rem, .mobile-header is sticky with a minimum height of 4.5rem, while the newly targeted #list and #create panels have no scroll-margin-top. Following either hub link therefore aligns the panel with the top of the viewport underneath the header, obscuring its heading and the first part of the requested section. Add an appropriate scroll offset to these fragment targets.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

#create and #list now have scroll-margin-top: calc(4.5rem + 0.75rem) at the mobile-header breakpoint so the heading clears the sticky bar.

</div>
@endif
<div class="panel">
<div class="panel" id="list">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve the list target across pagination

When any of these lists contains more than 20 records, Laravel's generated pagination links contain the page query but not the new #list fragment. A staff member who arrives via the View link and selects another page is therefore returned to the top of the index; if they can create records, the compose form appears before the requested list again. Set the paginator's fragment to list on all six affected index endpoints so browsing remains anchored to the list.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Service index paginators now use fragment('list'), so page links keep #list. Covered for Shelter pets and APES CIC tickets in ServiceHubQuickLinksTest.

Pagination links dropped #list, and the sticky mobile header covered the compose and list headings.

Co-authored-by: APES Director <apescic-director@users.noreply.github.com>
@apescic-director
apescic-director merged commit 1694f90 into main Sep 14, 2026
3 checks passed
@apescic-director
apescic-director deleted the bmurphy/fix-136-hub-create-view-urls-63e9 branch September 14, 2026 10:28
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.

[v1.2.0] 01 [Bug] Hub “what you can do” Create and View share one URL

2 participants