Repository navigation
Develop #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Develop #82
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,32 +1,32 @@ | ||
| name: opencode | ||
|
|
||
| on: | ||
| issue_comment: | ||
| types: [created] | ||
| pull_request_review_comment: | ||
| types: [created] | ||
| issue_comment: | ||
| types: [created] | ||
| pull_request_review_comment: | ||
| types: [created] | ||
|
|
||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
| pull-requests: read | ||
| issues: read | ||
| id-token: write | ||
| contents: read | ||
| pull-requests: read | ||
| issues: read | ||
|
|
||
| jobs: | ||
| opencode: | ||
| if: | | ||
| contains(github.event.comment.body, ' /oc') || | ||
| startsWith(github.event.comment.body, '/oc') || | ||
| contains(github.event.comment.body, ' /opencode') || | ||
| startsWith(github.event.comment.body, '/opencode') | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
| opencode: | ||
| if: | | ||
| contains(github.event.comment.body, ' /opencode') || | ||
| contains(github.event.comment.body, ' /oc') || | ||
| startsWith(github.event.comment.body, '/oc') || | ||
| startsWith(github.event.comment.body, '/opencode') | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Run opencode | ||
| uses: anomalyco/opencode/github@latest | ||
| env: | ||
| OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} | ||
| with: | ||
| model: opencode/grok-code | ||
| - name: Run opencode | ||
| uses: anomalyco/opencode/github@latest | ||
| env: | ||
| OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} | ||
| with: | ||
| model: opencode/grok-code |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # General Code Style Principles | ||
|
|
||
| This document outlines general coding principles that apply across all languages and frameworks used in this project. | ||
|
|
||
| ## Readability | ||
| - Code should be easy to read and understand by humans. | ||
| - Avoid overly clever or obscure constructs. | ||
|
|
||
| ## Consistency | ||
| - Follow existing patterns in the codebase. | ||
| - Maintain consistent formatting, naming, and structure. | ||
|
|
||
| ## Simplicity | ||
| - Prefer simple solutions over complex ones. | ||
| - Break down complex problems into smaller, manageable parts. | ||
|
|
||
| ## Maintainability | ||
| - Write code that is easy to modify and extend. | ||
| - Minimize dependencies and coupling. | ||
|
|
||
| ## Documentation | ||
| - Document *why* something is done, not just *what*. | ||
| - Keep documentation up-to-date with code changes. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # Google HTML/CSS Style Guide Summary | ||
|
|
||
| This document summarizes key rules and best practices from the Google HTML/CSS Style Guide. | ||
|
|
||
| ## 1. General Rules | ||
| - **Protocol:** Use HTTPS for all embedded resources. | ||
| - **Indentation:** Indent by 2 spaces. Do not use tabs. | ||
| - **Capitalization:** Use only lowercase for all code (element names, attributes, selectors, properties). | ||
| - **Trailing Whitespace:** Remove all trailing whitespace. | ||
| - **Encoding:** Use UTF-8 (without a BOM). Specify `<meta charset="utf-8">` in HTML. | ||
|
|
||
| ## 2. HTML Style Rules | ||
| - **Document Type:** Use `<!doctype html>`. | ||
| - **HTML Validity:** Use valid HTML. | ||
| - **Semantics:** Use HTML elements according to their intended purpose (e.g., use `<p>` for paragraphs, not for spacing). | ||
| - **Multimedia Fallback:** Provide `alt` text for images and transcripts/captions for audio/video. | ||
| - **Separation of Concerns:** Strictly separate structure (HTML), presentation (CSS), and behavior (JavaScript). Link to CSS and JS from external files. | ||
| - **`type` Attributes:** Omit `type` attributes for stylesheets (`<link>`) and scripts (`<script>`). | ||
|
|
||
| ## 3. HTML Formatting Rules | ||
| - **General:** Use a new line for every block, list, or table element, and indent its children. | ||
| - **Quotation Marks:** Use double quotation marks (`""`) for attribute values. | ||
|
|
||
| ## 4. CSS Style Rules | ||
| - **CSS Validity:** Use valid CSS. | ||
| - **Class Naming:** Use meaningful, generic names. Separate words with a hyphen (`-`). | ||
| - **Good:** `.video-player`, `.site-navigation` | ||
| - **Bad:** `.vid`, `.red-text` | ||
| - **ID Selectors:** Avoid using ID selectors for styling. Prefer class selectors. | ||
| - **Shorthand Properties:** Use shorthand properties where possible (e.g., `padding`, `font`). | ||
| - **`0` and Units:** Omit units for `0` values (e.g., `margin: 0;`). | ||
| - **Leading `0`s:** Always include leading `0`s for decimal values (e.g., `font-size: 0.8em;`). | ||
| - **Hexadecimal Notation:** Use 3-character hex notation where possible (e.g., `#fff`). | ||
| - **`!important`:** Avoid using `!important`. | ||
|
|
||
| ## 5. CSS Formatting Rules | ||
| - **Declaration Order:** Alphabetize declarations within a rule. | ||
| - **Indentation:** Indent all block content. | ||
| - **Semicolons:** Use a semicolon after every declaration. | ||
| - **Spacing:** | ||
| - Use a space after a property name's colon (`font-weight: bold;`). | ||
| - Use a space between the last selector and the opening brace (`.foo {`). | ||
| - Start a new line for each selector and declaration. | ||
| - **Rule Separation:** Separate rules with a new line. | ||
| - **Quotation Marks:** Use single quotes (`''`) for attribute selectors and property values (e.g., `[type='text']`). | ||
|
|
||
| **BE CONSISTENT.** When editing code, match the existing style. | ||
|
|
||
| *Source: [Google HTML/CSS Style Guide](https://google.github.io/styleguide/htmlcssguide.html)* |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # Google JavaScript Style Guide Summary | ||
|
|
||
| This document summarizes key rules and best practices from the Google JavaScript Style Guide. | ||
|
|
||
| ## 1. Source File Basics | ||
| - **File Naming:** All lowercase, with underscores (`_`) or dashes (`-`). Extension must be `.js`. | ||
| - **File Encoding:** UTF-8. | ||
| - **Whitespace:** Use only ASCII horizontal spaces (0x20). Tabs are forbidden for indentation. | ||
|
|
||
| ## 2. Source File Structure | ||
| - New files should be ES modules (`import`/`export`). | ||
| - **Exports:** Use named exports (`export {MyClass};`). **Do not use default exports.** | ||
| - **Imports:** Do not use line-wrapped imports. The `.js` extension in import paths is mandatory. | ||
|
|
||
| ## 3. Formatting | ||
| - **Braces:** Required for all control structures (`if`, `for`, `while`, etc.), even single-line blocks. Use K&R style ("Egyptian brackets"). | ||
| - **Indentation:** +2 spaces for each new block. | ||
| - **Semicolons:** Every statement must be terminated with a semicolon. | ||
| - **Column Limit:** 80 characters. | ||
| - **Line-wrapping:** Indent continuation lines at least +4 spaces. | ||
| - **Whitespace:** Use single blank lines between methods. No trailing whitespace. | ||
|
|
||
| ## 4. Language Features | ||
| - **Variable Declarations:** Use `const` by default, `let` if reassignment is needed. **`var` is forbidden.** | ||
| - **Array Literals:** Use trailing commas. Do not use the `Array` constructor. | ||
| - **Object Literals:** Use trailing commas and shorthand properties. Do not use the `Object` constructor. | ||
| - **Classes:** Do not use JavaScript getter/setter properties (`get name()`). Provide ordinary methods instead. | ||
| - **Functions:** Prefer arrow functions for nested functions to preserve `this` context. | ||
| - **String Literals:** Use single quotes (`'`). Use template literals (`` ` ``) for multi-line strings or complex interpolation. | ||
| - **Control Structures:** Prefer `for-of` loops. `for-in` loops should only be used on dict-style objects. | ||
| - **`this`:** Only use `this` in class constructors, methods, or in arrow functions defined within them. | ||
| - **Equality Checks:** Always use identity operators (`===` / `!==`). | ||
|
|
||
| ## 5. Disallowed Features | ||
| - `with` keyword. | ||
| - `eval()` or `Function(...string)`. | ||
| - Automatic Semicolon Insertion. | ||
| - Modifying builtin objects (`Array.prototype.foo = ...`). | ||
|
|
||
| ## 6. Naming | ||
| - **Classes:** `UpperCamelCase`. | ||
| - **Methods & Functions:** `lowerCamelCase`. | ||
| - **Constants:** `CONSTANT_CASE` (all uppercase with underscores). | ||
| - **Non-constant Fields & Variables:** `lowerCamelCase`. | ||
|
|
||
| ## 7. JSDoc | ||
| - JSDoc is used on all classes, fields, and methods. | ||
| - Use `@param`, `@return`, `@override`, `@deprecated`. | ||
| - Type annotations are enclosed in braces (e.g., `/** @param {string} userName */`). | ||
|
|
||
| *Source: [Google JavaScript Style Guide](https://google.github.io/styleguide/jsguide.html)* |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Several components are being passed props cast to
any, which undermines the benefits of TypeScript and can lead to runtime errors. You have already imported specific UI tool types at the top of the file, which should be used to ensure type safety.Specifically, the following components are affected:
CompanyProfileCard(lines 232-233)CommitHistoryList(lines 244-245)WeatherCardandForecastView(output on lines 257, 263)NewsCarousel(lines 275-276)ArxivPaperCard(lines 287-288)SearchResultList(lines 299-300)If tools have slightly different input/output shapes, you can use a union type to handle them correctly.
For example, for
CompanyProfileCard:Applying this pattern to all the listed components will significantly improve type safety and code quality.