Skip to content

Add Gitea repository URL to remote work dashboard table#188

Merged
ht3aa merged 6 commits intomainfrom
cursor/2026-04-04-remote-work-gitea-link
Apr 4, 2026
Merged

Add Gitea repository URL to remote work dashboard table#188
ht3aa merged 6 commits intomainfrom
cursor/2026-04-04-remote-work-gitea-link

Conversation

@ht3aa
Copy link
Copy Markdown
Owner

@ht3aa ht3aa commented Apr 4, 2026

Summary

  • Append gitea_repository_url (from the existing CompanyJob accessor) to each job on the remote work dashboard index so the Vue table can render it.
  • Add a Gitea repository column with the full URL as an external link, or an em dash when no repo is provisioned.
  • Update CompanyJobPolicy::viewAny so verified users can open the dashboard listing (controller already scopes to the authenticated user’s jobs; this matches the policy docblock).

Tests

  • php artisan test --compact tests/Feature/RemoteWorkTest.php --filter="includes gitea repository url"

Made with Cursor

Append gitea_repository_url for each job on the dashboard index and show it
as a full external link. Align CompanyJob viewAny with verified job owners so
the listing is authorized for the same users who can manage posts.

Made-with: Cursor
@ht3aa ht3aa added the cursor Pull request opened by a Cursor agent label Apr 4, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the Gitea repository URL to the remote work dashboard, allowing users to view and access repository links directly from the jobs list. Changes include updating the CompanyJobPolicy to permit access for verified users, appending the repository URL in the RemoteWorkController, and enhancing the Vue frontend to display the new column. A new feature test was also added to verify the integration. Feedback focuses on using the more idiomatic through method for paginated collections and improving URL readability in the UI by using break-words instead of break-all.

Comment on lines +33 to +35
$jobs->getCollection()->transform(
fn (CompanyJob $job): CompanyJob => $job->append('gitea_repository_url'),
);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

While using transform on the collection works, Laravel's LengthAwarePaginator provides a through method which is more idiomatic for mapping or modifying paginated items. It also allows for a more fluent chain.

        $jobs->through(
            fn (CompanyJob $job): CompanyJob => $job->append('gitea_repository_url'),
        );

{{ job.status }}
</Badge>
</TableCell>
<TableCell class="max-w-md break-all text-sm">
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Consider using break-words instead of break-all. While break-all prevents layout overflow by breaking at any character, break-words is generally more readable for URLs as it tries to break at hyphens or slashes first.

                            <TableCell class="max-w-md break-words text-sm">

@ht3aa ht3aa merged commit 33810d1 into main Apr 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cursor Pull request opened by a Cursor agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant