Skip to content

refactor: adjust file url#2181

Merged
jo-elimu merged 2 commits intomainfrom
2153-adjust-file-url
May 6, 2025
Merged

refactor: adjust file url#2181
jo-elimu merged 2 commits intomainfrom
2153-adjust-file-url

Conversation

@jo-elimu
Copy link
Copy Markdown
Member

@jo-elimu jo-elimu commented May 6, 2025

Issue Number

Purpose

Technical Details

Testing Instructions

Screenshots


Format Checks

Note

Files in PRs are automatically checked for format violations with mvn spotless:check.

If this PR contains files with format violations, run mvn spotless:apply to fix them.

@jo-elimu jo-elimu self-assigned this May 6, 2025
@jo-elimu jo-elimu requested a review from a team as a code owner May 6, 2025 06:36
@jo-elimu jo-elimu requested review from vrudas and removed request for a team May 6, 2025 06:36
@jo-elimu jo-elimu linked an issue May 6, 2025 that may be closed by this pull request
@jo-elimu jo-elimu requested review from nya-elimu and tomaszsmy May 6, 2025 06:36
@codecov
Copy link
Copy Markdown

codecov bot commented May 6, 2025

Codecov Report

Attention: Patch coverage is 0% with 12 lines in your changes missing coverage. Please review.

Project coverage is 15.18%. Comparing base (f78c618) to head (f0f7001).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...pplications/ApplicationVersionsRestController.java 0.00% 5 Missing ⚠️
...on_version/ApplicationVersionCreateController.java 0.00% 5 Missing ⚠️
...i/elimu/entity/application/ApplicationVersion.java 0.00% 1 Missing ⚠️
.../ai/elimu/web/servlet/CustomDispatcherServlet.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2181      +/-   ##
============================================
- Coverage     15.19%   15.18%   -0.02%     
  Complexity      391      391              
============================================
  Files           232      232              
  Lines          6204     6209       +5     
  Branches        717      717              
============================================
  Hits            943      943              
- Misses         5210     5215       +5     
  Partials         51       51              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented May 6, 2025

Caution

Review failed

The pull request is closed.

## Walkthrough

A new non-nullable `repoName` field was added to the `Application` entity and its database schema. The application creation and edit forms now include this field, and UI components display a GitHub repository link based on it. The dispatcher servlet sets a default value for `repoName` during database population. The `ApplicationVersion.getFileUrl()` method was updated to use `repoName` instead of the package name for GitHub URL construction. Temporary APK storage was reorganized into language-specific subdirectories. Discord notification code was removed.

## Changes

| Files/Paths                                                                                  | Change Summary                                                                                                    |
|---------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|
| `src/main/java/ai/elimu/entity/application/Application.java`                                 | Added `repoName` field with `@NotNull` annotation and documentation.                                             |
| `src/main/resources/META-INF/jpa-schema-export.sql`                                          | Added `repoName` column to `Application` table.                                                                  |
| `src/main/java/ai/elimu/web/servlet/CustomDispatcherServlet.java`                            | Set `repoName` property to `"sound-cards"` in `populateDatabase` method.                                         |
| `src/main/webapp/WEB-INF/jsp/application/create.jsp`,<br>`edit.jsp`                          | Added "Repo name" input field to creation/edit forms; replaced static package name display with disabled input; added GitHub repo link in edit form aside. |
| `src/main/webapp/WEB-INF/jsp/application-version/create.jsp`                                 | Added "GitHub repo" link section to "Resources" aside panel using `repoName`.                                   |
| `src/main/java/ai/elimu/entity/application/ApplicationVersion.java`                          | Modified `getFileUrl()` to use `repoName` instead of derived package name for GitHub URL path segment.           |
| `src/main/java/ai/elimu/rest/v2/applications/ApplicationVersionsRestController.java`          | Removed Discord notification; changed APK temp storage to language-specific subdirectory.                         |
| `src/main/java/ai/elimu/web/application/application_version/ApplicationVersionCreateController.java` | Changed APK temp storage to language-specific subdirectory; added logging for directory creation.                 |
| `pom-dependency-tree.txt`                                                                    | Updated main artifact version from `2.6.3-SNAPSHOT` to `2.6.5-SNAPSHOT`.                                         |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant User
    participant WebApp
    participant Database

    User->>WebApp: Open Application create/edit page
    WebApp->>Database: Fetch Application (if editing)
    WebApp-->>User: Display form with 'Repo name' field

    User->>WebApp: Submit form with repoName
    WebApp->>Database: Save Application with repoName

    User->>WebApp: View Application version page
    WebApp->>Database: Fetch ApplicationVersion and Application
    WebApp-->>User: Display GitHub repo link using repoName

    Note over WebApp: APK files saved in language-specific temp directory

Assessment against linked issues

Objective Addressed Explanation
Add repoName to Application entity and present form field with GitHub org URL (#356)
Show link to GitHub repository of Applications (#356)
Add fileUrl to ApplicationVersion and remove bytes property (#2153) No changes related to adding fileUrl property or removing bytes field in ApplicationVersion.

Possibly related PRs

Suggested reviewers

  • jpatel3
  • eymaal
  • AshishBagdane

<!-- walkthrough_end -->
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKNwSPbABsvkCiQBHbGlcSHFcLzpIACJ/ADM0MXwKLjRaIWxEULj4SMhsCi9oyAB3NGQHAWZ1Gno5MNgPTMpIIUISL3hmbHRkW0gMRwEWgCYARgAOMf4sXEa/Em58RHVk2Q0Yef7/RHwvKWQkB2lIMwBmAFYANgAaU/GLs7vMelhcXG5EDgB6b6J1WDYAQaJjMb4dLrYMDab4leAAa3g3yOwUQ33GAE5eigMLR4AxqFF4LN5kpEAwKPBuOJ8BgNgA5fDoWh4mkYNC+bgFJaIEh3GgMWAYfEcyBKXDaLyIfkhYlEHFZCjYMTwWnS/h8cn+MiIWD4XDIEqUDy8fASeBKejEhoeMkUqlsjbuax2YkMLzYMnoAb6jwqfB4SBxZLMaiMRoMeHqtgYNlyhphnKRQ5YWzIZx+vAsaginzyQWieFRYN8Euh0LmvY5tX5FYYeUAA2YEiwiCWEWkXwLkYbz1xKDikErXmrGGQJAAHkhcPzGvJdQGvHUPDkJ1E4XNIE2W/Z28mvmhuNwvLIG06tnZtMxkAQFgkknwXsyMlkbUHch4AKo2AAydwEgYYE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j6r7yUtGz7YrdXZ4vCEor55Hr4UrLb4n/5763l7r3lH44lPnAUX6gXvnv7Uy85F7vnoUOw54kBWB4CKZBAhBDR/kAU1pgwWIzlQwGywxgGUmQGWK0lMVqL2J26cXtkAD6jGcuPFKMfFtIbiCuJAQlZKPglA4l8skl/J0l2BslIpBsCl8wdEzyy2/gfsJA1EleC1PBQyJBelxU1V8Axlp6wxRcDY+tRl51Xg0yXZuAdpsxMy9c0Q2O7AGgLlrVA8gK9ApKFVhwwyjVW4zV+VpAMcgwzAycoQ5lJwCx+hlQ9l2V+QKVb4GVtl0k0Q400I8AxQVd/lIe9AfhnB/8lAWA0QLlYA/mewlKpVb4Sdwe2hFWJ5VgF2ZJY8YErYV0RIY4s1CAyAE9pAS1kEq1ldbx1d82UVmEg47dyVs2TdXyLdo+kAP4+ARA/wSezBCFsYhoza1uZaVAkYUOCuXaTx1AXWI5qAkmm9JA29K1xO+961uVQ5HBM9F265m5+A25TxRUnxt8d9Aqwt82Ndc5ZNu6dOqMVN4JuJNY56dN6JqFH5d6IqNFys4qqkbEaCx9PEhAApq6QisYXAVA4kOBAVsk9EKgagikLEKkBgjDQk6gytFoiAyt9p+0wWytMKBMykDDaEkAAADCQCMAAOxxBjCiBjAshQbiFxAYgMBnDqMTBnAYi0AjC0AXACBjBXCiBnATAAAs6j2jbjPmKEYjajEjuAUjvcsjzt8jdAytGEKjQAA= -->

<!-- internal state end -->

---

<details>
<summary>📜 Recent review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 0e27f1ec1ddceabef9c30839d2d5b16ec384074b and f0f700146fad03590eb1d6ba3acbee20e7868886.

</details>

<details>
<summary>📒 Files selected for processing (4)</summary>

* `src/main/java/ai/elimu/entity/application/ApplicationVersion.java` (1 hunks)
* `src/main/java/ai/elimu/rest/v2/applications/ApplicationVersionsRestController.java` (2 hunks)
* `src/main/java/ai/elimu/web/application/application_version/ApplicationVersionCreateController.java` (2 hunks)
* `src/main/java/ai/elimu/web/servlet/CustomDispatcherServlet.java` (1 hunks)

</details>

</details>
<!-- finishing_touch_checkbox_start -->

<details open="true">
<summary>✨ Finishing Touches</summary>

- [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate Docstrings

</details>

<!-- finishing_touch_checkbox_end -->
<!-- tips_start -->

---

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=elimu-ai/webapp&utm_content=2181):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Generate unit testing code for this file.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai generate unit testing code for this file.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and generate unit testing code.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

### Support

Need help? Create a ticket on our [support page](https://www.coderabbit.ai/contact-us/support) for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/main/webapp/WEB-INF/jsp/application/create.jsp (1)

18-21: Field added with appropriate styling and placeholder

The new repository name field has been correctly added to the form with proper label, error handling classes, and a helpful placeholder example. The column layout maintains UI consistency with the package name field.

Consider adding a hint about the expected format for the repository name, especially if it's intended to be used in constructing GitHub URLs.

                <div class="col s12 m6 input-field">
                    <form:label path="repoName" cssErrorClass="error">Repo name</form:label>
                    <form:input path="repoName" cssErrorClass="error" placeholder="soundcards" />
+                   <div class="helper-text">GitHub repository name (without organization name)</div>
                </div>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5caf02e and 0e27f1e.

📒 Files selected for processing (7)
  • pom-dependency-tree.txt (1 hunks)
  • src/main/java/ai/elimu/entity/application/Application.java (1 hunks)
  • src/main/java/ai/elimu/web/servlet/CustomDispatcherServlet.java (1 hunks)
  • src/main/resources/META-INF/jpa-schema-export.sql (1 hunks)
  • src/main/webapp/WEB-INF/jsp/application/application-version/create.jsp (1 hunks)
  • src/main/webapp/WEB-INF/jsp/application/create.jsp (1 hunks)
  • src/main/webapp/WEB-INF/jsp/application/edit.jsp (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (12)
  • GitHub Check: test_ui
  • GitHub Check: build (windows-latest, 17)
  • GitHub Check: build (windows-latest, 21)
  • GitHub Check: build (macos-latest, 21)
  • GitHub Check: build (macos-latest, 17)
  • GitHub Check: build (ubuntu-latest, 21)
  • GitHub Check: build (ubuntu-latest, 17)
  • GitHub Check: test_rest
  • GitHub Check: test_rest
  • GitHub Check: test_rest
  • GitHub Check: test_rest
  • GitHub Check: test_rest
🔇 Additional comments (6)
pom-dependency-tree.txt (1)

1-1: Version bump to support new features

The artifact version has been updated from 2.6.3-SNAPSHOT to 2.6.5-SNAPSHOT, which aligns with the new repoName field implementation.

src/main/java/ai/elimu/web/servlet/CustomDispatcherServlet.java (1)

293-293: Default value for repoName correctly set

The new repoName field is properly initialized with "soundcards" during database population, which aligns with the packageName value format.

src/main/resources/META-INF/jpa-schema-export.sql (1)

111-111:

Details

❌ Incorrect review comment

Schema updated for new field

The repoName column has been correctly added to the Application table schema. The column type (varchar(255)) is appropriate for storing repository names.

However, consider whether this column should have a NOT NULL constraint to match the non-nullable nature of the field in the entity class.


🏁 Script executed:

#!/bin/bash
# Check if the Application entity has a non-nullable repoName field
fd -e java "Application.java" --exec grep -A 10 "repoName" {} \;

Length of output: 374


Approved: Schema Addition of repoName
The repoName varchar(255) column has been correctly added to the Application table and aligns with the JPA default (nullable) setting on the private String repoName; field. No NOT NULL constraint is required unless you intend to enforce non-nullability at the application level.

• If you do want to make repoName non-nullable, annotate the field in Application.java with @Column(nullable = false) (or add a Bean Validation @NotNull), then update the DDL to:

-        repoName varchar(255),
+        repoName varchar(255) NOT NULL,

• Otherwise, no further changes are needed.

Likely an incorrect or invalid review comment.

src/main/java/ai/elimu/entity/application/Application.java (1)

27-31: Well-documented addition of the repoName field

The addition of the non-nullable repoName field with clear documentation explaining its purpose is good. This field will help maintain a consistent way to reference GitHub repositories throughout the application.

src/main/webapp/WEB-INF/jsp/application/edit.jsp (2)

19-26: Good implementation of form fields for package and repo name

The changes to display the package name as a disabled field while adding an editable field for the repo name makes sense. This allows users to edit the repository name while preserving the immutability of the package name.


169-179: Well-structured resources section with GitHub repository link

The addition of the "Resources" section with a link to the GitHub repository is well-implemented. The link is properly constructed and opens in a new tab, allowing users to easily access the repository while maintaining their current context.

@jo-elimu jo-elimu merged commit 7341757 into main May 6, 2025
14 of 15 checks passed
@jo-elimu jo-elimu deleted the 2153-adjust-file-url branch May 6, 2025 06:52
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.

Store APK files on GitHub/JitPack Add fileUrl to ApplicationVersion Show link to GitHub repository of Applications

1 participant