-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add explore link in header #802
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
Conversation
📝 WalkthroughWalkthrough
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 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. Comment |
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.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
daras_ai_v2/settings.py (1)
295-303: Allow EXPLORE_URL override — avoid domain driftAdd an EXPLORE_URL env override (fallback to the computed value) and standardize all Explore links to use EXPLORE_URL or a relative "/explore/" instead of baking domains from APP_BASE_URL.
-EXPLORE_URL = furl(APP_BASE_URL).add(path="explore").url +# Allow override to avoid domain drift in mixed FE/BE environments. +EXPLORE_URL = config( + "EXPLORE_URL", + default=furl(APP_BASE_URL).add(path="explore").url, +)Files/locations to update (found by grep): daras_ai_v2/settings.py:295 (apply diff), templates/footer.html ("/explore/"), routers/root.py (DEFAULT_LOGIN_REDIRECT, paths list, @gui.route("/explore/")), daras_ai_v2/base.py (gui.link(to="/explore/")), payments/plans.py (href="/explore"), scripts/test_wa_msg_send.py (hard-coded https://gooey.ai/explore/), README.md/Home.py (external explore links) — replace absolute or separately-constructed Explore URLs with EXPLORE_URL or use relative paths.
🧹 Nitpick comments (3)
daras_ai_v2/settings.py (1)
301-308: Nit: keep link paths consistent (trailing slash policy).HEADER_LINKS mixes "/api/" (with slash) and "/pricing" (without). Pick one convention to avoid accidental double‑redirects in some proxies/CDNs.
workspaces/widgets.py (2)
144-151: Icon lookup keyed by URL is brittle across envs; key by label instead.URLs can be absolute or relative depending on config, breaking the map. Labels are stable.
Apply this diff:
- for url, label in settings.HEADER_LINKS: + for url, label in settings.HEADER_LINKS: workspace_selector_link( url=url, label=label, - icon=settings.HEADER_ICONS.get(url), + icon=settings.HEADER_ICONS.get(label), )Follow‑up: populate HEADER_ICONS with label keys (e.g., {"Explore": ""}). Avoid importing icons into settings to prevent reverse deps; keep raw icon HTML strings there or move the mapping next to this widget.
171-176: Open external links in a new tab with rel=noopener to avoid context loss and tab‑nabbing.Small‑screen popover now includes external links (Docs/Blog/Contact). Prefer new tab.
Apply this diff:
def workspace_selector_link( url: str, label: str, caption: str | None = None, icon: str | None = None, row_height: str = "2.2rem", ): - with gui.tag( + is_external = url.startswith("http://") or url.startswith("https://") + extra_attrs = dict(target="_blank", rel="noopener") if is_external else {} + with gui.tag( "a", href=url, + **extra_attrs, className="text-decoration-none d-block bg-hover-light align-items-center px-3 my-1 py-1", style=dict(height=row_height), ):
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
daras_ai_v2/settings.py(1 hunks)routers/root.py(0 hunks)workspaces/widgets.py(1 hunks)
💤 Files with no reviewable changes (1)
- routers/root.py
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: nikochiko
PR: GooeyAI/gooey-server#703
File: daras_ai_v2/settings.py:301-308
Timestamp: 2025-06-16T11:42:40.993Z
Learning: In daras_ai_v2/settings.py, when using a localhost frontend with api.gooey.ai backend deployment, hard-coded "/explore/" paths work correctly as relative URLs, but EXPLORE_URL computed from APP_BASE_URL may point to the wrong domain (localhost instead of api.gooey.ai).
📚 Learning: 2025-06-16T11:42:40.993Z
Learnt from: nikochiko
PR: GooeyAI/gooey-server#703
File: daras_ai_v2/settings.py:301-308
Timestamp: 2025-06-16T11:42:40.993Z
Learning: In daras_ai_v2/settings.py, when using a localhost frontend with api.gooey.ai backend deployment, hard-coded "/explore/" paths work correctly as relative URLs, but EXPLORE_URL computed from APP_BASE_URL may point to the wrong domain (localhost instead of api.gooey.ai).
Applied to files:
daras_ai_v2/settings.py
🧬 Code graph analysis (1)
workspaces/widgets.py (1)
routers/root.py (1)
logout(175-177)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Analyze (python)
- GitHub Check: test (3.10.12, 1.8.3)
🔇 Additional comments (1)
workspaces/widgets.py (1)
27-27: Import cleanup looks good.Dropping the unused explore import (now data‑driven) reduces coupling and potential cycles.
Q/A checklist
How to check import time?
You can visualize this using tuna:
To measure import time for a specific library:
To reduce import times, import libraries that take a long time inside the functions that use them instead of at the top of the file:
Legal Boilerplate
Look, I get it. The entity doing business as “Gooey.AI” and/or “Dara.network” was incorporated in the State of Delaware in 2020 as Dara Network Inc. and is gonna need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Dara Network Inc can use, modify, copy, and redistribute my contributions, under its choice of terms.