Repository navigation
daytrader-go: account - #4
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Ports the account area of DayTrader 3 to Go + PostgreSQL. Only
daytrader-go/internal/features/account/anddaytrader-go/templates/account_*.htmlare touched.TradeServletAction.doRegister+TradeSLSBBean.registerweb.RegisterPublicAction("register"): one profile row and one account row inStore.InTx, id fromStore.NextID("account"), thenapp.Forward(..., "login", {"uid", "passwd"})register.jspweb.RegisterRoute("GET /register.jsp"), templateaccount_register(same form field names, prefilled from the request)doAccount+account.jspweb.RegisterAction("account"), templateaccount_account; status line fromweb.Attr(r, "results")doAccountUpdate+updateAccountProfileweb.RegisterAction("update_profile"): same two validation messages, update inStore.InTx, then the account pageLegacy behaviour kept:
Total Orders: 0and an empty recent-orders table (docs/BASELINE.mdquirk 2).accountOrders()returns an empty list on purpose; the order rows are still in the template.Registration operation failed, your passwords did not match; an existing user id givesRegistration operation failed;; a non-numericmoneyor a missingpasswdis HTTP 500.update_profiletrims its fields likeString.trim(); register does not trim.Verification
gofmt -l .,go vet ./...,go test ./...clean indaytrader-go/(Go 1.27.0). New unit tests inaccount_test.go(validation, templates, register failure paths, login gate); they need no database.make parity13/13.make parity TARGET=http://localhost:8080/daytraderon a local throwaway branch = this branch +devin/1794800000-go-auth+devin/1794800000-go-market(the siblings on origin at the time):registerandaccountsteps match; theportfoliostep shows the welcome page because the trading branch was not pushed yet. Not seen passing.update_profileoutcomes are identical apart from blank lines, the account id and the items below.Deliberate differences
lastloginstarts at the creation date instead of NULL, becausestore.Account.LastLoginis not nullable and the login that follows would fail to scan it. Not visible: login sets it straight after.HTML 4.01(sharedpageStart), legacyaccount.jspsaysHTML 4.0.html/template; the JSPs print them raw.Scaffold requests
store.Account.LastLoginnullable (*time.Time) if the NULL-until-first-login state should be stored as legacy does.Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/229a43d96c0948fabb011e57e8cf3029
Open in Devin Desktop: https://partner-workshops.devinenterprise.com/desktop/session/229a43d96c0948fabb011e57e8cf3029?variant=devin
Requested by: @sumitshatwara